Rollup merge of #136951 - compiler-errors:clause-binder, r=lqd
Use the right binder for rebinding `PolyTraitRef` Fixes #136940 I committed a slightly different test which still demonstrates the issue.
This commit is contained in:
commit
3957eaa459
2 changed files with 20 additions and 2 deletions
|
@ -47,11 +47,11 @@ pub fn expand_trait_aliases<'tcx>(
|
|||
queue.extend(
|
||||
tcx.explicit_super_predicates_of(trait_pred.def_id())
|
||||
.iter_identity_copied()
|
||||
.map(|(clause, span)| {
|
||||
.map(|(super_clause, span)| {
|
||||
let mut spans = spans.clone();
|
||||
spans.push(span);
|
||||
(
|
||||
clause.instantiate_supertrait(
|
||||
super_clause.instantiate_supertrait(
|
||||
tcx,
|
||||
clause.kind().rebind(trait_pred.trait_ref),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue