Move TyCtxt::mk_x to Ty::new_x where applicable
This commit is contained in:
@@ -343,7 +343,7 @@ fn emit_orphan_check_error<'tcx>(
|
||||
// That way if we had `Vec<MyType>`, we will properly attribute the
|
||||
// problem to `Vec<T>` and avoid confusing the user if they were to see
|
||||
// `MyType` in the error.
|
||||
ty::Adt(def, _) => tcx.mk_adt(*def, ty::List::empty()),
|
||||
ty::Adt(def, _) => Ty::new_adt(tcx, *def, ty::List::empty()),
|
||||
_ => ty,
|
||||
};
|
||||
let msg = |ty: &str, postfix: &str| {
|
||||
@@ -605,7 +605,9 @@ fn fast_reject_auto_impl<'tcx>(tcx: TyCtxt<'tcx>, trait_def_id: DefId, self_ty:
|
||||
}
|
||||
|
||||
let self_ty_root = match self_ty.kind() {
|
||||
ty::Adt(def, _) => tcx.mk_adt(*def, InternalSubsts::identity_for_item(tcx, def.did())),
|
||||
ty::Adt(def, _) => {
|
||||
Ty::new_adt(tcx, *def, InternalSubsts::identity_for_item(tcx, def.did()))
|
||||
}
|
||||
_ => unimplemented!("unexpected self ty {:?}", self_ty),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user