about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJana Dönszelmann <jana@donsz.nl>2025-05-02 16:36:48 +0200
committerJana Dönszelmann <jana@donsz.nl>2025-05-02 18:09:31 +0200
commit5424e4f1db86d49e632d8a8e96f400e012c9153f (patch)
treef67eac822bfade4bde3ca56e1226cd3e194cba6d
parent3cc172074a1ed94aa90372360688a000b47e6946 (diff)
downloadrust-5424e4f1db86d49e632d8a8e96f400e012c9153f.tar.gz
rust-5424e4f1db86d49e632d8a8e96f400e012c9153f.zip
remove an unused codepath
-rw-r--r--compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
index 0f8acadb978..3b7d31b1b13 100644
--- a/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
+++ b/compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
@@ -2954,12 +2954,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
             }
         }
 
-        let name = if borrow_span.in_external_macro(self.infcx.tcx.sess.source_map()) {
-            // Don't name local variables in external macros.
-            "value".to_string()
-        } else {
-            format!("`{name}`")
-        };
+        let name = format!("`{name}`");
 
         let mut err = self.path_does_not_live_long_enough(borrow_span, &name);