]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_span/src/lib.rs
Rollup merge of #106897 - estebank:issue-99430, r=davidtwco
[rust.git] / compiler / rustc_span / src / lib.rs
index bee4b0a2332b55022ef570f0a6cb102b93de9b92..7e61f2f9f73c0a3d5c27ceb4eb3fe2d457558b5b 100644 (file)
@@ -329,7 +329,7 @@ fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
             ProcMacroSourceCode(_) => write!(fmt, "<proc-macro source code>"),
             CfgSpec(_) => write!(fmt, "<cfgspec>"),
             CliCrateAttr(_) => write!(fmt, "<crate attribute>"),
-            Custom(ref s) => write!(fmt, "<{}>", s),
+            Custom(ref s) => write!(fmt, "<{s}>"),
             DocTest(ref path, _) => write!(fmt, "{}", path.display()),
             InlineAsm(_) => write!(fmt, "<inline asm>"),
         }
@@ -1074,7 +1074,7 @@ fn new(pos: BytePos, width: usize) -> Self {
             0 => NonNarrowChar::ZeroWidth(pos),
             2 => NonNarrowChar::Wide(pos),
             4 => NonNarrowChar::Tab(pos),
-            _ => panic!("width {} given for non-narrow character", width),
+            _ => panic!("width {width} given for non-narrow character"),
         }
     }