about summary refs log tree commit diff
path: root/compiler/rustc_driver_impl
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-06 10:04:26 +0000
committerbors <bors@rust-lang.org>2024-03-06 10:04:26 +0000
commit09bc67b9158392361780e779d32997f14cc75c39 (patch)
tree5be026cf4a3255bb9b9de9ed2e7d5f0697515fda /compiler/rustc_driver_impl
parent80399064afa4a2cd153f30d02c25f7ea0383ed65 (diff)
parentaf0d5082ee6d54bd3f2cb6347802d2a755e5192c (diff)
downloadrust-09bc67b9158392361780e779d32997f14cc75c39.tar.gz
rust-09bc67b9158392361780e779d32997f14cc75c39.zip
Auto merge of #121679 - lcnr:opaque-wf-check-2, r=oli-obk
stricter hidden type wf-check [based on #115008]

Original work by `@aliemjay` in #115008. A huge thanks to them for originally figuring out this approach :heart:

Fixes https://github.com/rust-lang/rust/issues/114728
Fixes https://github.com/rust-lang/rust/issues/114572

Instead of adding the `WellFormed` obligations when relating opaque types, we now always emit such an obligation when defining the hidden type.

This causes nested opaque types which aren't wf to error, see the comment below for the described impact. I believe this change to be desirable as it significantly reduces complexity by removing special-cases.

It also caused an issue with RPITIT: in defaulted trait methods, we add a `Projection(synthetic_assoc, rpit_of_trait_method)` clause to the `param_env`. This clause is not added to the `ParamEnv` of the nested coroutines. This caused a normalization failure in `fn check_coroutine_obligations` with the new solver. I fixed that by using the env of the typeck root instead.

r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_driver_impl')
0 files changed, 0 insertions, 0 deletions