Commit 5e7672a
authored
Rollup merge of rust-lang#157807 - Dnreikronos:assumptions_on_binders_non_lifetime_binder_ambiguity, r=BoxyUwU
don't ice on non-lifetime binders under `-Zassumptions-on-binders`
fixes rust-lang#157778
w/ `-Znext-solver=globally -Zassumptions-on-binders` and a non-lifetime binder we hit `assert!(max_universe < u)` in `pull_region_outlives_constraints_out_of_universe` and ICE.
the machinery here is region-outlives only, but a `for<T>` binder leaves a placeholder type in universe `u` that the region-only rewrite can't pull out, so an alias outlives like `<!T as Trait>::Assoc: 'r` reaches that assert still in `u`. just report ambiguity in that case, same as the `None => Ambiguity` bails right next to it — now it errors normally (E0284) instead of ICEing.
r? @lcnr3 files changed
Lines changed: 61 additions & 7 deletions
File tree
- compiler/rustc_type_ir/src
- tests/ui/assumptions_on_binders
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
843 | | - | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
844 | 852 | | |
845 | 853 | | |
846 | 854 | | |
| |||
885 | 893 | | |
886 | 894 | | |
887 | 895 | | |
888 | | - | |
889 | | - | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
894 | 907 | | |
895 | 908 | | |
896 | 909 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments