diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-26 21:21:20 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-12-13 17:34:44 +0000 |
| commit | 5c6afb850c29f5604f685bf4d4fea85a2deb7197 (patch) | |
| tree | b89915de1c6af256c67a1c2fe1fbdba8cb68cf70 /compiler/rustc_trait_selection/src/traits/object_safety.rs | |
| parent | 7f3af726065d9eaabf93d87f22d97f60cca7a5f1 (diff) | |
| download | rust-5c6afb850c29f5604f685bf4d4fea85a2deb7197.tar.gz rust-5c6afb850c29f5604f685bf4d4fea85a2deb7197.zip | |
ProjectionTy.item_def_id -> ProjectionTy.def_id
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/object_safety.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/object_safety.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/object_safety.rs b/compiler/rustc_trait_selection/src/traits/object_safety.rs index a45749fe48c..4cfcd74f337 100644 --- a/compiler/rustc_trait_selection/src/traits/object_safety.rs +++ b/compiler/rustc_trait_selection/src/traits/object_safety.rs @@ -589,7 +589,7 @@ fn object_ty_for_trait<'tcx>( let pred = obligation.predicate.to_opt_poly_projection_pred()?; Some(pred.map_bound(|p| { ty::ExistentialPredicate::Projection(ty::ExistentialProjection { - item_def_id: p.projection_ty.item_def_id, + def_id: p.projection_ty.def_id, substs: p.projection_ty.substs, term: p.term, }) @@ -795,7 +795,7 @@ fn contains_illegal_self_type_reference<'tcx, T: TypeVisitable<'tcx>>( } } ty::Projection(ref data) - if self.tcx.def_kind(data.item_def_id) == DefKind::ImplTraitPlaceholder => + if self.tcx.def_kind(data.def_id) == DefKind::ImplTraitPlaceholder => { // We'll deny these later in their own pass ControlFlow::CONTINUE @@ -862,9 +862,9 @@ pub fn contains_illegal_impl_trait_in_trait<'tcx>( ty.skip_binder().walk().find_map(|arg| { if let ty::GenericArgKind::Type(ty) = arg.unpack() && let ty::Projection(proj) = ty.kind() - && tcx.def_kind(proj.item_def_id) == DefKind::ImplTraitPlaceholder + && tcx.def_kind(proj.def_id) == DefKind::ImplTraitPlaceholder { - Some(MethodViolationCode::ReferencesImplTraitInTrait(tcx.def_span(proj.item_def_id))) + Some(MethodViolationCode::ReferencesImplTraitInTrait(tcx.def_span(proj.def_id))) } else { None } |
