Auto merge of #113126 - Bryanskiy:delete_old, r=petrochenkov
Replace old private-in-public diagnostic with type privacy lints Next part of RFC https://github.com/rust-lang/rust/issues/48054. r? `@petrochenkov`
This commit is contained in:
commit
1accf068d8
68 changed files with 862 additions and 1700 deletions
|
@ -247,8 +247,6 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> {
|
|||
})
|
||||
}
|
||||
ast::VisibilityKind::Restricted { ref path, id, .. } => {
|
||||
// Make `PRIVATE_IN_PUBLIC` lint a hard error.
|
||||
self.r.has_pub_restricted = true;
|
||||
// For visibilities we are not ready to provide correct implementation of "uniform
|
||||
// paths" right now, so on 2018 edition we only allow module-relative paths for now.
|
||||
// On 2015 edition visibilities are resolved as crate-relative by default,
|
||||
|
|
|
@ -989,7 +989,6 @@ pub struct Resolver<'a, 'tcx> {
|
|||
glob_map: FxHashMap<LocalDefId, FxHashSet<Symbol>>,
|
||||
/// Visibilities in "lowered" form, for all entities that have them.
|
||||
visibilities: FxHashMap<LocalDefId, ty::Visibility>,
|
||||
has_pub_restricted: bool,
|
||||
used_imports: FxHashSet<NodeId>,
|
||||
maybe_unused_trait_imports: FxIndexSet<LocalDefId>,
|
||||
|
||||
|
@ -1342,7 +1341,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
|
||||
glob_map: Default::default(),
|
||||
visibilities,
|
||||
has_pub_restricted: false,
|
||||
used_imports: FxHashSet::default(),
|
||||
maybe_unused_trait_imports: Default::default(),
|
||||
|
||||
|
@ -1486,7 +1484,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
let proc_macros = self.proc_macros.iter().map(|id| self.local_def_id(*id)).collect();
|
||||
let expn_that_defined = self.expn_that_defined;
|
||||
let visibilities = self.visibilities;
|
||||
let has_pub_restricted = self.has_pub_restricted;
|
||||
let extern_crate_map = self.extern_crate_map;
|
||||
let maybe_unused_trait_imports = self.maybe_unused_trait_imports;
|
||||
let glob_map = self.glob_map;
|
||||
|
@ -1504,7 +1501,6 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
let global_ctxt = ResolverGlobalCtxt {
|
||||
expn_that_defined,
|
||||
visibilities,
|
||||
has_pub_restricted,
|
||||
effective_visibilities,
|
||||
extern_crate_map,
|
||||
module_children: self.module_children,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue