diff options
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 12 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/codegen_attrs.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mono_item.rs | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 8e07d128dbd..8c582fac0d8 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -759,7 +759,7 @@ fn link_natively( sess.dcx().abort_if_errors(); // Invoke the system linker - info!("{:?}", &cmd); + info!("{cmd:?}"); let retry_on_segfault = env::var("RUSTC_RETRY_LINKER_ON_SEGFAULT").is_ok(); let unknown_arg_regex = Regex::new(r"(unknown|unrecognized) (command line )?(option|argument)").unwrap(); @@ -796,7 +796,7 @@ fn link_natively( cmd.arg(arg); } } - info!("{:?}", &cmd); + info!("{cmd:?}"); continue; } @@ -817,7 +817,7 @@ fn link_natively( cmd.arg(arg); } } - info!("{:?}", &cmd); + info!("{cmd:?}"); continue; } @@ -878,7 +878,7 @@ fn link_natively( cmd.arg(arg); } } - info!("{:?}", &cmd); + info!("{cmd:?}"); continue; } @@ -996,7 +996,7 @@ fn link_natively( sess.dcx().emit_err(errors::UnableToExeLinker { linker_path, error: e, - command_formatted: format!("{:?}", &cmd), + command_formatted: format!("{cmd:?}"), }); } @@ -1567,7 +1567,7 @@ fn print_native_static_libs( sess.dcx().emit_note(errors::StaticLibraryNativeArtifacts); // Prefix for greppability // Note: This must not be translated as tools are allowed to depend on this exact string. - sess.dcx().note(format!("native-static-libs: {}", &lib_args.join(" "))); + sess.dcx().note(format!("native-static-libs: {}", lib_args.join(" "))); } } } diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs index 56a893738df..bfa4c683d56 100644 --- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs +++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs @@ -328,7 +328,7 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { sym::link_section => { if let Some(val) = attr.value_str() { if val.as_str().bytes().any(|b| b == 0) { - let msg = format!("illegal null byte in link_section value: `{}`", &val); + let msg = format!("illegal null byte in link_section value: `{val}`"); tcx.dcx().span_err(attr.span, msg); } else { codegen_fn_attrs.link_section = Some(val); @@ -726,7 +726,7 @@ fn check_link_ordinal(tcx: TyCtxt<'_>, attr: &ast::Attribute) -> Option<u16> { if *ordinal <= u16::MAX as u128 { Some(ordinal.get() as u16) } else { - let msg = format!("ordinal value in `link_ordinal` is too large: `{}`", &ordinal); + let msg = format!("ordinal value in `link_ordinal` is too large: `{ordinal}`"); tcx.dcx() .struct_span_err(attr.span, msg) .with_note("the value may not exceed `u16::MAX`") diff --git a/compiler/rustc_codegen_ssa/src/mono_item.rs b/compiler/rustc_codegen_ssa/src/mono_item.rs index 0fbcb938d1a..559ec400577 100644 --- a/compiler/rustc_codegen_ssa/src/mono_item.rs +++ b/compiler/rustc_codegen_ssa/src/mono_item.rs @@ -130,7 +130,7 @@ impl<'a, 'tcx: 'a> MonoItemExt<'a, 'tcx> for MonoItem<'tcx> { let symbol_name = self.symbol_name(cx.tcx()).name; - debug!("symbol {}", &symbol_name); + debug!("symbol {symbol_name}"); match *self { MonoItem::Static(def_id) => { |
