about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/diagnostics.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-03-04 17:10:55 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-03-12 09:35:11 +1100
commit0b2d7062c47fa385ff83e20dc53b13c8c5ba4616 (patch)
tree4bc279d596a743d5ea5d9defb03616783b67663d /compiler/rustc_resolve/src/diagnostics.rs
parentfe04460f6fdc32c0783ca7cab6a0fb73ed254100 (diff)
downloadrust-0b2d7062c47fa385ff83e20dc53b13c8c5ba4616.tar.gz
rust-0b2d7062c47fa385ff83e20dc53b13c8c5ba4616.zip
Introduce `sym::dummy` and `Ident::dummy`.
The idea is to identify cases of symbols/identifiers that are not
expected to be used. There isn't a perfectly sharp line between "dummy"
and "not dummy", but I think it's useful nonetheless.
Diffstat (limited to 'compiler/rustc_resolve/src/diagnostics.rs')
-rw-r--r--compiler/rustc_resolve/src/diagnostics.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs
index e3405c89b79..88d1126de1a 100644
--- a/compiler/rustc_resolve/src/diagnostics.rs
+++ b/compiler/rustc_resolve/src/diagnostics.rs
@@ -2266,7 +2266,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
                     && !first.ident.is_path_segment_keyword() =>
             {
                 // Insert a placeholder that's later replaced by `self`/`super`/etc.
-                path.insert(0, Segment::from_ident(Ident::empty()));
+                path.insert(0, Segment::from_ident(Ident::dummy()));
             }
             _ => return None,
         }