Change to just use first binders and add test
This commit is contained in:
parent
c34e7c60f5
commit
0daabbee2d
5 changed files with 218 additions and 27 deletions
|
@ -1386,11 +1386,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
let auto_trait_predicates = auto_traits.into_iter().map(|trait_ref| {
|
||||
ty::Binder::dummy(ty::ExistentialPredicate::AutoTrait(trait_ref.trait_ref().def_id()))
|
||||
});
|
||||
// N.b. principal, projections, auto traits
|
||||
// FIXME: This is actually wrong with multiple principals in regards to symbol mangling
|
||||
let mut v = regular_trait_predicates
|
||||
.chain(auto_trait_predicates)
|
||||
.chain(
|
||||
existential_projections.map(|x| x.map_bound(ty::ExistentialPredicate::Projection)),
|
||||
)
|
||||
.chain(auto_trait_predicates)
|
||||
.collect::<SmallVec<[_; 8]>>();
|
||||
v.sort_by(|a, b| a.skip_binder().stable_cmp(tcx, &b.skip_binder()));
|
||||
v.dedup();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue