diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-03-13 00:52:25 +0100 | 
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-08-01 21:38:45 +0200 | 
| commit | d7ea161b7e71f6a76868b1566bad31c1ca52824c (patch) | |
| tree | f54e79e0433cf00d8ef7b48dbec3491f94f4c073 /compiler/rustc_traits/src/chalk/db.rs | |
| parent | 8ee4446ee5e1c23bef61b45f74e37db4bad2f424 (diff) | |
| download | rust-d7ea161b7e71f6a76868b1566bad31c1ca52824c.tar.gz rust-d7ea161b7e71f6a76868b1566bad31c1ca52824c.zip | |
Remove DefId from AssocItemContainer.
Diffstat (limited to 'compiler/rustc_traits/src/chalk/db.rs')
| -rw-r--r-- | compiler/rustc_traits/src/chalk/db.rs | 8 | 
1 files changed, 3 insertions, 5 deletions
| diff --git a/compiler/rustc_traits/src/chalk/db.rs b/compiler/rustc_traits/src/chalk/db.rs index 497819ce5c5..14a60ace441 100644 --- a/compiler/rustc_traits/src/chalk/db.rs +++ b/compiler/rustc_traits/src/chalk/db.rs @@ -8,9 +8,7 @@ use rustc_middle::traits::ChalkRustInterner as RustInterner; use rustc_middle::ty::subst::{InternalSubsts, Subst, SubstsRef}; -use rustc_middle::ty::{ - self, AssocItemContainer, AssocKind, EarlyBinder, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable, -}; +use rustc_middle::ty::{self, AssocKind, EarlyBinder, Ty, TyCtxt, TypeFoldable, TypeSuperFoldable}; use rustc_ast::ast; use rustc_attr as attr; @@ -74,7 +72,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t ) -> Arc<chalk_solve::rust_ir::AssociatedTyDatum<RustInterner<'tcx>>> { let def_id = assoc_type_id.0; let assoc_item = self.interner.tcx.associated_item(def_id); - let AssocItemContainer::TraitContainer(trait_def_id) = assoc_item.container else { + let Some(trait_def_id) = assoc_item.trait_container(self.interner.tcx) else { unimplemented!("Not possible??"); }; match assoc_item.kind { @@ -455,7 +453,7 @@ impl<'tcx> chalk_solve::RustIrDatabase<RustInterner<'tcx>> for RustIrDatabase<'t ) -> Arc<chalk_solve::rust_ir::AssociatedTyValue<RustInterner<'tcx>>> { let def_id = associated_ty_id.0; let assoc_item = self.interner.tcx.associated_item(def_id); - let impl_id = assoc_item.container.id(); + let impl_id = assoc_item.container_id(self.interner.tcx); match assoc_item.kind { AssocKind::Type => {} _ => unimplemented!("Not possible??"), | 
