Skip to content

Commit

Permalink
Elaborate supertraits in dyn candidates
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jul 18, 2024
1 parent 44d1985 commit 9f39b2e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rustc_type_ir::data_structures::HashMap;
use rustc_type_ir::fold::{TypeFoldable, TypeFolder, TypeSuperFoldable};
use rustc_type_ir::inherent::*;
use rustc_type_ir::lang_items::TraitSolverLangItem;
use rustc_type_ir::{self as ty, Interner, Upcast as _};
use rustc_type_ir::{self as ty, elaborate, Interner, Upcast as _};
use rustc_type_ir_macros::{TypeFoldable_Generic, TypeVisitable_Generic};
use tracing::instrument;

Expand Down Expand Up @@ -668,11 +668,12 @@ where
{
let cx = ecx.cx();
let mut requirements = vec![];
requirements.extend(
requirements.extend(elaborate::elaborate(
cx,
cx.explicit_super_predicates_of(trait_ref.def_id)
.iter_instantiated(cx, trait_ref.args)
.map(|(pred, _)| pred),
);
));

// FIXME(associated_const_equality): Also add associated consts to
// the requirements here.
Expand Down

0 comments on commit 9f39b2e

Please sign in to comment.