Check item bounds for projection clause wellformedness #150662
Check item bounds for projection clause wellformedness #150662adwinwhite wants to merge 2 commits intorust-lang:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
af69d7d to
6939aa1
Compare
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #150844) made this pull request unmergeable. Please resolve the merge conflicts. |
| region_mapping: FxHashMap<ty::Region<'tcx>, ty::Region<'tcx>>, | ||
| const_mapping: FxHashMap<ty::Const<'tcx>, ty::Const<'tcx>>, | ||
| } | ||
| impl<'tcx> PredicateArgFolder<'tcx> { |
There was a problem hiding this comment.
how does this folder differ from whatever.instantiate(projection.projection_term.args)? 🤔
There was a problem hiding this comment.
This folder additionally maps identity projection alias to the rhs type of the projection: Self::Assoc -> projection.term. It's needed to apply the item bounds on projection.term.
E.g.
trait Trait<T> {
type Assoc: Bound<T>;
}
fn function<T, U, I>()
where
// We need to transform `Self::Assoc: Bound<T>` into `U: Bound<I>`.
// With instantiating alone, the result would be `T::Assoc: Bound<I>`, which is pointless
// as `AliasBound` candidate already covers this.
T: Trait<I, Assoc = U>
{}6939aa1 to
8e8010e
Compare
This comment has been minimized.
This comment has been minimized.
8e8010e to
1249bd0
Compare
|
@bors try |
This comment has been minimized.
This comment has been minimized.
Check item bounds for projection clause wellformedness
|
@craterbot run name=150662-leaf mode=check-only start=master#08cd08fbef8c6663b052d8d9e4930d5696cbb8a7 end=try#b6bca0d7327839b5e3f7a7779947cb9113d08917+rustflags=-Zstrict-projection-item-bounds |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
Experiment for #149283.
There're some fatal regressions.
Preparing to run crater to find out the range of breakages.
r? @ghost