rust/compiler/rustc_typeck
Matthias Krüger 8810af8082
Rollup merge of #93227 - compiler-errors:gat-hrtb-wfcheck, r=jackh726
Liberate late bound regions when collecting GAT substs in wfcheck

The issue here is that the [`GATSubstCollector`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_typeck/src/check/wfcheck.rs#L604) does not currently do anything wrt `Binder`s, so the GAT substs it copies out have escaping late bound regions when it walks through types like `for<'x> fn() -> Self::Gat<'x>`.

I made that visitor call `liberate_late_bound_regions`, not sure if that's the right thing here or we need to do something else to replace these bound vars with placeholders. I'm not familiar with other code doing anything similar.. But the issue is indeed no longer ICEing.

Fixes #92954

r? `@jackh726`
since you last touched this code, feel free to reassign
2022-01-23 20:13:06 +01:00
..
src Rollup merge of #93227 - compiler-errors:gat-hrtb-wfcheck, r=jackh726 2022-01-23 20:13:06 +01:00
Cargo.toml Fix control flow handling in generator_interior 2022-01-18 14:25:26 -08:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.