diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-11 14:14:08 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-12 09:35:13 +1100 |
| commit | 4eadaff1844a0bfc7f8f69bbd1c137538b92b9dc (patch) | |
| tree | 4b75499414384e2a38aad13b75771b3573ca8db0 /compiler/rustc_privacy/src/lib.rs | |
| parent | 0b2d7062c47fa385ff83e20dc53b13c8c5ba4616 (diff) | |
| download | rust-4eadaff1844a0bfc7f8f69bbd1c137538b92b9dc.tar.gz rust-4eadaff1844a0bfc7f8f69bbd1c137538b92b9dc.zip | |
Convert a `kw::Empty` occurrence to `sym::dummy`.
`adjust_ident_and_get_scope` returns the symbol it receives unchanged, and the call site ignores the returned symbol, so this symbol is unused.
Diffstat (limited to 'compiler/rustc_privacy/src/lib.rs')
| -rw-r--r-- | compiler/rustc_privacy/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs index 5271d03a6f6..ff203b2938e 100644 --- a/compiler/rustc_privacy/src/lib.rs +++ b/compiler/rustc_privacy/src/lib.rs @@ -40,7 +40,7 @@ use rustc_middle::ty::{ use rustc_middle::{bug, span_bug}; use rustc_session::lint; use rustc_span::hygiene::Transparency; -use rustc_span::{Ident, Span, Symbol, kw, sym}; +use rustc_span::{Ident, Span, Symbol, sym}; use tracing::debug; use {rustc_attr_parsing as attr, rustc_hir as hir}; @@ -935,8 +935,8 @@ impl<'tcx> NamePrivacyVisitor<'tcx> { } // definition of the field - let ident = Ident::new(kw::Empty, use_ctxt); - let def_id = self.tcx.adjust_ident_and_get_scope(ident, def.did(), hir_id).1; + let ident = Ident::new(sym::dummy, use_ctxt); + let (_, def_id) = self.tcx.adjust_ident_and_get_scope(ident, def.did(), hir_id); !field.vis.is_accessible_from(def_id, self.tcx) } |
