Avoid ref when using format! in compiler
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse.
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user