]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_pretty/src/pprust/state/item.rs
Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk
[rust.git] / compiler / rustc_ast_pretty / src / pprust / state / item.rs
index 5b6a07721e2bbdb605710cfb2a701f5e90078584..bf2c73a66a2cbb435e605af1c68b9321c6ecbbaa 100644 (file)
@@ -411,9 +411,9 @@ pub(crate) fn print_visibility(&mut self, vis: &ast::Visibility) {
             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 => {}