]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_ast_pretty/src/pprust/state/item.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / compiler / rustc_ast_pretty / src / pprust / state / item.rs
index 5b6a07721e2bbdb605710cfb2a701f5e90078584..bf2c73a66a2cbb435e605af1c68b9321c6ecbbaa 100644 (file)
@@ -411,9 +411,9 @@ impl<'a> State<'a> {
             ast::VisibilityKind::Restricted { path, shorthand, .. } => {
                 let path = Self::to_string(|s| s.print_path(path, false, 0));
                 if *shorthand && (path == "crate" || path == "self" || path == "super") {
-                    self.word_nbsp(format!("pub({})", path))
+                    self.word_nbsp(format!("pub({path})"))
                 } else {
-                    self.word_nbsp(format!("pub(in {})", path))
+                    self.word_nbsp(format!("pub(in {path})"))
                 }
             }
             ast::VisibilityKind::Inherited => {}