diff options
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/asm.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/item.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index dfef6ec70fc..941d3179587 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -104,7 +104,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { Err(supported_abis) => { let mut abis = format!("`{}`", supported_abis[0]); for m in &supported_abis[1..] { - let _ = write!(abis, ", `{}`", m); + let _ = write!(abis, ", `{m}`"); } self.tcx.sess.emit_err(InvalidAbiClobberAbi { abi_span: *abi_span, @@ -262,7 +262,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { let sub = if !valid_modifiers.is_empty() { let mut mods = format!("`{}`", valid_modifiers[0]); for m in &valid_modifiers[1..] { - let _ = write!(mods, ", `{}`", m); + let _ = write!(mods, ", `{m}`"); } InvalidAsmTemplateModifierRegClassSub::SupportModifier { class_name: class.name(), diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index b6b242bfc27..ea30bed5ace 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -1051,7 +1051,7 @@ impl<'hir> LoweringContext<'_, 'hir> { } _ => { // Replace the ident for bindings that aren't simple. - let name = format!("__arg{}", index); + let name = format!("__arg{index}"); let ident = Ident::from_str(&name); (ident, false) diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 83174afdb12..2e135aafb1e 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -296,7 +296,7 @@ impl std::fmt::Display for ImplTraitPosition { ImplTraitPosition::ImplReturn => "`impl` method return", }; - write!(f, "{}", name) + write!(f, "{name}") } } @@ -503,7 +503,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { fn orig_local_def_id(&self, node: NodeId) -> LocalDefId { self.orig_opt_local_def_id(node) - .unwrap_or_else(|| panic!("no entry for node id: `{:?}`", node)) + .unwrap_or_else(|| panic!("no entry for node id: `{node:?}`")) } /// Given the id of some node in the AST, finds the `LocalDefId` associated with it by the name @@ -524,7 +524,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { } fn local_def_id(&self, node: NodeId) -> LocalDefId { - self.opt_local_def_id(node).unwrap_or_else(|| panic!("no entry for node id: `{:?}`", node)) + self.opt_local_def_id(node).unwrap_or_else(|| panic!("no entry for node id: `{node:?}`")) } /// Get the previously recorded `to` local def id given the `from` local def id, obtained using @@ -2197,7 +2197,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { fn lower_trait_ref(&mut self, p: &TraitRef, itctx: &ImplTraitContext) -> hir::TraitRef<'hir> { let path = match self.lower_qpath(p.ref_id, &None, &p.path, ParamMode::Explicit, itctx) { hir::QPath::Resolved(None, path) => path, - qpath => panic!("lower_trait_ref: unexpected QPath `{:?}`", qpath), + qpath => panic!("lower_trait_ref: unexpected QPath `{qpath:?}`"), }; hir::TraitRef { path, hir_ref_id: self.lower_node_id(p.ref_id) } } |
