1
Fork 0

Rename some variants

This commit is contained in:
Michael Goulet 2022-08-29 03:53:33 +00:00 committed by Eric Holk
parent 12ec2f0e34
commit b2ed2dcaae
16 changed files with 38 additions and 56 deletions

View file

@ -31,8 +31,8 @@ use rustc_middle::ty::subst::{GenericArgKind, SubstsRef, UserSubsts};
use rustc_middle::ty::visit::TypeVisitable;
use rustc_middle::ty::{
self, Binder, CanonicalUserTypeAnnotation, CanonicalUserTypeAnnotations, Dynamic,
OpaqueHiddenType, OpaqueTypeKey, RegionVid, ToPredicate, TraitObjectRepresentation, Ty, TyCtxt,
UserType, UserTypeAnnotationIndex,
OpaqueHiddenType, OpaqueTypeKey, RegionVid, ToPredicate, Ty, TyCtxt, UserType,
UserTypeAnnotationIndex,
};
use rustc_span::def_id::CRATE_DEF_ID;
use rustc_span::{Span, DUMMY_SP};
@ -2015,9 +2015,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
//
// apply them to prove that the source type `Foo` implements `Clone` etc
let (existential_predicates, region) = match ty.kind() {
Dynamic(predicates, region, TraitObjectRepresentation::Sized) => {
(predicates, region)
}
Dynamic(predicates, region, ty::DynStar) => (predicates, region),
_ => panic!("Invalid dyn* cast_ty"),
};