diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-12 20:32:50 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-13 17:02:47 +0000 |
| commit | ce8dae5800dd0a8837984d1c15f5bc68bd126a4d (patch) | |
| tree | f78480712c78ecb0dcc3246a4d8c893a9a694e35 /compiler/rustc_ty_utils | |
| parent | f1b1ed7e18f1fbe5226a96626827c625985f8285 (diff) | |
| download | rust-ce8dae5800dd0a8837984d1c15f5bc68bd126a4d.tar.gz rust-ce8dae5800dd0a8837984d1c15f5bc68bd126a4d.zip | |
Don't opt_rpitit_info as a separate query
Diffstat (limited to 'compiler/rustc_ty_utils')
| -rw-r--r-- | compiler/rustc_ty_utils/src/assoc.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/compiler/rustc_ty_utils/src/assoc.rs b/compiler/rustc_ty_utils/src/assoc.rs index 209365b70a7..867974749d5 100644 --- a/compiler/rustc_ty_utils/src/assoc.rs +++ b/compiler/rustc_ty_utils/src/assoc.rs @@ -153,6 +153,7 @@ fn associated_item_from_trait_item_ref(trait_item_ref: &hir::TraitItemRef) -> ty trait_item_def_id: Some(owner_id.to_def_id()), container: ty::TraitContainer, fn_has_self_parameter: has_self, + opt_rpitit_info: None, } } @@ -171,6 +172,7 @@ fn associated_item_from_impl_item_ref(impl_item_ref: &hir::ImplItemRef) -> ty::A trait_item_def_id: impl_item_ref.trait_item_def_id, container: ty::ImplContainer, fn_has_self_parameter: has_self, + opt_rpitit_info: None, } } @@ -262,12 +264,6 @@ fn associated_item_for_impl_trait_in_trait( // Copy span of the opaque. trait_assoc_ty.def_ident_span(Some(span)); - // Add the def_id of the function and opaque that generated this synthesized associated type. - trait_assoc_ty.opt_rpitit_info(Some(ImplTraitInTraitData::Trait { - fn_def_id, - opaque_def_id: opaque_ty_def_id.to_def_id(), - })); - trait_assoc_ty.associated_item(ty::AssocItem { name: kw::Empty, kind: ty::AssocKind::Type, @@ -275,6 +271,10 @@ fn associated_item_for_impl_trait_in_trait( trait_item_def_id: None, container: ty::TraitContainer, fn_has_self_parameter: false, + opt_rpitit_info: Some(ImplTraitInTraitData::Trait { + fn_def_id, + opaque_def_id: opaque_ty_def_id.to_def_id(), + }), }); // Copy visility of the containing function. @@ -328,11 +328,6 @@ fn impl_associated_item_for_impl_trait_in_trait( // `opt_local_def_id_to_hir_id` with `None`. impl_assoc_ty.opt_local_def_id_to_hir_id(None); - // Add the def_id of the function that generated this synthesized associated type. - impl_assoc_ty.opt_rpitit_info(Some(ImplTraitInTraitData::Impl { - fn_def_id: impl_fn_def_id.to_def_id(), - })); - impl_assoc_ty.associated_item(ty::AssocItem { name: kw::Empty, kind: ty::AssocKind::Type, @@ -340,6 +335,7 @@ fn impl_associated_item_for_impl_trait_in_trait( trait_item_def_id: Some(trait_assoc_def_id.to_def_id()), container: ty::ImplContainer, fn_has_self_parameter: false, + opt_rpitit_info: Some(ImplTraitInTraitData::Impl { fn_def_id: impl_fn_def_id.to_def_id() }), }); // Copy param_env of the containing function. The synthesized associated type doesn't have |
