Skip to content

Commit 2e215cd

Browse files
Add TyKind::TyAlias support in rustc_privacy
1 parent 8b20c6a commit 2e215cd

File tree

1 file changed

+6
-0
lines changed
  • compiler/rustc_privacy/src

1 file changed

+6
-0
lines changed

compiler/rustc_privacy/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,11 @@ where
253253
})?;
254254
}
255255
}
256+
ty::TyAlias(def_id, substs) => {
257+
let generic_ty = tcx.bound_type_of(def_id);
258+
let concrete_ty = tcx.peel_off_ty_alias(generic_ty.subst(tcx, substs));
259+
return self.visit_ty(concrete_ty);
260+
}
256261
// These types don't have their own def-ids (but may have subcomponents
257262
// with def-ids that should be visited recursively).
258263
ty::Bool
@@ -270,6 +275,7 @@ where
270275
| ty::FnPtr(..)
271276
| ty::Param(..)
272277
| ty::Error(_)
278+
| ty::TyAlias(..)
273279
| ty::GeneratorWitness(..) => {}
274280
ty::Bound(..) | ty::Placeholder(..) | ty::Infer(..) => {
275281
bug!("unexpected type: {:?}", ty)

0 commit comments

Comments
 (0)