1
Fork 0

Rollup merge of #135706 - compiler-errors:elaborate, r=lcnr

Move `supertrait_def_ids` into the elaborate module like all other fns

It's strange that this is the only elaborate-like fn on tcx.

r? lcnr
This commit is contained in:
Matthias Krüger 2025-01-21 23:30:18 +01:00 committed by GitHub
commit 4af3ff8cd1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 27 additions and 26 deletions

View file

@ -13,6 +13,7 @@ use rustc_middle::query::Providers;
use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt};
use rustc_session::parse::feature_err;
use rustc_span::{ErrorGuaranteed, sym};
use rustc_type_ir::elaborate;
use tracing::debug;
use crate::errors;
@ -205,7 +206,7 @@ fn check_object_overlap<'tcx>(
// With the feature enabled, the trait is not implemented automatically,
// so this is valid.
} else {
let mut supertrait_def_ids = tcx.supertrait_def_ids(component_def_id);
let mut supertrait_def_ids = elaborate::supertrait_def_ids(tcx, component_def_id);
if supertrait_def_ids
.any(|d| d == trait_def_id && tcx.trait_def(d).implement_via_object)
{