Get rid of the redundant elaboration in middle
This commit is contained in:
parent
90423a7abb
commit
66eb346770
7 changed files with 40 additions and 100 deletions
|
@ -6,7 +6,7 @@ use rustc_type_ir::fast_reject::{DeepRejectCtxt, TreatParams};
|
|||
use rustc_type_ir::inherent::*;
|
||||
use rustc_type_ir::lang_items::TraitSolverLangItem;
|
||||
use rustc_type_ir::visit::TypeVisitableExt as _;
|
||||
use rustc_type_ir::{self as ty, Interner, TraitPredicate, Upcast as _};
|
||||
use rustc_type_ir::{self as ty, elaborate, Interner, TraitPredicate, Upcast as _};
|
||||
use tracing::{instrument, trace};
|
||||
|
||||
use crate::delegate::SolverDelegate;
|
||||
|
@ -862,8 +862,7 @@ where
|
|||
.auto_traits()
|
||||
.into_iter()
|
||||
.chain(a_data.principal_def_id().into_iter().flat_map(|principal_def_id| {
|
||||
self.cx()
|
||||
.supertrait_def_ids(principal_def_id)
|
||||
elaborate::supertrait_def_ids(self.cx(), principal_def_id)
|
||||
.into_iter()
|
||||
.filter(|def_id| self.cx().trait_is_auto(*def_id))
|
||||
}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue