Skip to content

Commit d028b3e

Browse files
authored
Rollup merge of rust-lang#53001 - petrochenkov:master, r=estebank
privacy: Fix an ICE in `path_is_private_type` Fixes rust-lang#52879 (Untested.)
2 parents 035db4b + 6a3dfa4 commit d028b3e

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
@@ -1015,7 +1015,7 @@ struct ObsoleteCheckTypeForPrivatenessVisitor<'a, 'b: 'a, 'tcx: 'b> {
10151015
impl<'a, 'tcx> ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> {
10161016
fn path_is_private_type(&self, path: &hir::Path) -> bool {
10171017
let did = match path.def {
1018-
Def::PrimTy(..) | Def::SelfTy(..) => return false,
1018+
Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => return false,
10191019
def => def.def_id(),
10201020
};
10211021

0 commit comments

Comments
 (0)