Skip to content

Commit 31c4783

Browse files
committed
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.
1 parent 4f011ba commit 31c4783

File tree

1 file changed

+3
-3
lines changed
  • compiler/rustc_privacy/src

1 file changed

+3
-3
lines changed

compiler/rustc_privacy/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use rustc_middle::ty::{
4040
use rustc_middle::{bug, span_bug};
4141
use rustc_session::lint;
4242
use rustc_span::hygiene::Transparency;
43-
use rustc_span::{Ident, Span, Symbol, kw, sym};
43+
use rustc_span::{Ident, Span, Symbol, sym};
4444
use tracing::debug;
4545
use {rustc_attr_parsing as attr, rustc_hir as hir};
4646

@@ -935,8 +935,8 @@ impl<'tcx> NamePrivacyVisitor<'tcx> {
935935
}
936936

937937
// definition of the field
938-
let ident = Ident::new(kw::Empty, use_ctxt);
939-
let def_id = self.tcx.adjust_ident_and_get_scope(ident, def.did(), hir_id).1;
938+
let ident = Ident::new(sym::dummy, use_ctxt);
939+
let (_, def_id) = self.tcx.adjust_ident_and_get_scope(ident, def.did(), hir_id);
940940
!field.vis.is_accessible_from(def_id, self.tcx)
941941
}
942942

0 commit comments

Comments
 (0)