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.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user