Skip to content

Commit 6a3dfa4

Browse files
authored
privacy: Fix an ICE in path_is_private_type
Fixes #52879 (Untested.)
1 parent 6eafab0 commit 6a3dfa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_privacy/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ struct ObsoleteCheckTypeForPrivatenessVisitor<'a, 'b: 'a, 'tcx: 'b> {
10051005
impl<'a, 'tcx> ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
10061006
fn path_is_private_type(&self, path: &hir::Path) -> bool {
10071007
let did = match path.def {
1008-
Def::PrimTy(..) | Def::SelfTy(..) => return false,
1008+
Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => return false,
10091009
def => def.def_id(),
10101010
};
10111011

0 commit comments

Comments
 (0)