rust/compiler/rustc_hir_analysis
Matthias Krüger 246d989a30
Rollup merge of #109198 - compiler-errors:new-rpitit-default-body, r=spastorino
Install projection from RPITIT to default trait method opaque correctly

1. For new lowering strategy `-Zlower-impl-trait-in-trait-to-assoc-ty`, install the correct default trait method projection predicates (RPITIT -> opaque). This makes default trait body tests pass!

2. Fix two WF-checking bugs -- first, we want to make sure that we're always looking for an opaque type in `check_return_position_impl_trait_in_trait_bounds`. That's because the RPITIT projections are normalized to opaques during wfcheck. Second, fix RPITIT's param-envs by not adding the projection predicates that we install on trait methods to make default RPITITs work -- I left a comment why.

3. Also, just a small drive-by for `rustc_on_unimplemented`. Not sure if it affects any tests, but can't hurt.

r? ````@spastorino,```` based off of #109140
2023-03-17 08:42:40 +01:00
..
src Rollup merge of #109198 - compiler-errors:new-rpitit-default-body, r=spastorino 2023-03-17 08:42:40 +01:00
Cargo.toml Use ThinVec in various AST types. 2023-02-21 11:51:56 +11:00
messages.ftl Forbid the use of #[target_feature] on start 2023-03-12 14:57:38 +01:00
README.md

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