1
Fork 0

Remove DefId from AssocItemContainer.

This commit is contained in:
Camille GILLOT 2022-03-13 00:52:25 +01:00
parent 8ee4446ee5
commit d7ea161b7e
40 changed files with 190 additions and 220 deletions

View file

@ -212,7 +212,7 @@ where
// `impl Pub<Priv> { pub fn my_method() {} }` is considered a private type,
// so we need to visit the self type additionally.
if let Some(assoc_item) = tcx.opt_associated_item(def_id) {
if let ty::ImplContainer(impl_def_id) = assoc_item.container {
if let Some(impl_def_id) = assoc_item.impl_container(tcx) {
tcx.type_of(impl_def_id).visit_with(self)?;
}
}