Rollup merge of #53001 - petrochenkov:master, r=estebank
privacy: Fix an ICE in `path_is_private_type` Fixes https://github.com/rust-lang/rust/issues/52879 (Untested.)
This commit is contained in:
commit
d028b3ea33
@ -1015,7 +1015,7 @@ struct ObsoleteCheckTypeForPrivatenessVisitor<'a, 'b: 'a, 'tcx: 'b> {
|
||||
impl<'a, 'tcx> ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
|
||||
fn path_is_private_type(&self, path: &hir::Path) -> bool {
|
||||
let did = match path.def {
|
||||
Def::PrimTy(..) | Def::SelfTy(..) => return false,
|
||||
Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => return false,
|
||||
def => def.def_id(),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user