Commit f939d1f
authored
Rollup merge of rust-lang#123979 - oli-obk:define_opaque_types7, r=compiler-errors
Subtype predicates only exist on inference types, so we can allow them to register opaque types within them.
We were unable to come up with an example where this could be reached (subtype predicates with either side not being an infer var gets consumed during any `select_where_possible` invocation, of which we have a lot in typeck). To ensure we don't silently accept new behaviour in case we missed a situation where this could occur, I have added an assert that prevents opaque types from having their hidden type constrained.
r? `@compiler-errors`1 file changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
948 | 961 | | |
949 | 962 | | |
950 | 963 | | |
951 | 964 | | |
952 | 965 | | |
953 | | - | |
| 966 | + | |
954 | 967 | | |
955 | | - | |
| 968 | + | |
956 | 969 | | |
957 | 970 | | |
958 | 971 | | |
| |||
0 commit comments