Fix generics_of on traits new RPITITs and also migrate from ImplTraitPlaceholder to is_impl_trait_in_trait #109140
Closed
spastorino wants to merge 6 commits intorust-lang:masterfrom
Closed
Fix generics_of on traits new RPITITs and also migrate from ImplTraitPlaceholder to is_impl_trait_in_trait #109140spastorino wants to merge 6 commits intorust-lang:masterfrom
spastorino wants to merge 6 commits intorust-lang:masterfrom
Conversation
spastorino
commented
Mar 14, 2023
spastorino
commented
Mar 14, 2023
fcd0c8e to
2be342b
Compare
2be342b to
dfaf0bb
Compare
Contributor
compiler-errors
left a comment
There was a problem hiding this comment.
Left a few comments for FIXMEs or things that need to be fixed.
Also, I said FIXME(-Z...) but I was just too lazy to put the whole name, so replace that with -Zlower-impl-trait-blah-blah-blah whatever the full name is.
compiler/rustc_infer/src/infer/error_reporting/note_and_explain.rs
Outdated
Show resolved
Hide resolved
dfaf0bb to
6c033e9
Compare
Member
Author
|
Addressed some of the comments and rebased. Still need to go over the rest of the comments. |
ccc16a9 to
0827254
Compare
Member
Author
|
@compiler-errors this is ready, added FIXMEs to some of these things for now. |
0827254 to
c5c4340
Compare
Contributor
|
@bors r+ |
Collaborator
Contributor
|
Closing in favor of landing these commits together with #109198. |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 16, 2023
…-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 rust-lang#109140
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 17, 2023
…-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 rust-lang#109140
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 17, 2023
…-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 rust-lang#109140
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 17, 2023
…-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 rust-lang#109140
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
r? @compiler-errors
This is still kind of a draft because I'd like to add some comments and check some things a bit better, but anyway I'd also benefit from reviews.