Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emit ProjectionPredicate obligations when relating projections #96912

Closed
wants to merge 3 commits into from

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented May 10, 2022

fixes #96230
might also be #89196 need to check

when relating a projection with infer vars emit a ProjectionPredicate obligation so when encountering something like <T as Trait<_>>::Assoc eq Foo<u32> we can avoid erroring incase the _ gets inferred to something which would allow normalizing the projection to Foo<u32>

these changes should be feature gated before merging as the changes to selection are sus but its nice to have CI run with the changes having an effect while working on this

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 10, 2022
@BoxyUwU BoxyUwU force-pushed the lots_of_obligations branch from bd0f367 to 5db1bb3 Compare May 13, 2022 16:40
@bors
Copy link
Contributor

bors commented May 19, 2022

☔ The latest upstream changes (presumably #97024) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 19, 2022
@Mark-Simulacrum
Copy link
Member

@BoxyUwU BoxyUwU force-pushed the lots_of_obligations branch 2 times, most recently from 4ea40a6 to 56d3ee3 Compare May 21, 2022 02:40
@BoxyUwU BoxyUwU force-pushed the lots_of_obligations branch from 56d3ee3 to 0730fcc Compare June 11, 2022 03:15
@BoxyUwU BoxyUwU force-pushed the lots_of_obligations branch 2 times, most recently from d92e002 to 275bc1a Compare June 20, 2022 16:38
@BoxyUwU BoxyUwU changed the title [WIP] emit ProjectionPredicate obligations when relating projections emit ProjectionPredicate obligations when relating projections Jun 20, 2022
@BoxyUwU
Copy link
Member Author

BoxyUwU commented Jun 20, 2022

r? @jackh726

@jackh726
Copy link
Member

Uh, bors picked up an old comment?

@bors treeclosed-

@bors
Copy link
Contributor

bors commented Jun 27, 2022

☔ The latest upstream changes (presumably #98566) made this pull request unmergeable. Please resolve the merge conflicts.

@BoxyUwU BoxyUwU added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 2, 2022
@jackh726
Copy link
Member

@BoxyUwU thoughts to schedule this for a types team deep dive?

It would nice to have a greater discussion about the direction here (and of the proposed workaround to prevent overflows). I definitely don't feel comfortable approving the workaround by myself, because I do think it locks us into a corner, sort of.

@BoxyUwU
Copy link
Member Author

BoxyUwU commented Jul 11, 2022

not familiar with what actually is required for a types team dive but it does seem like a good idea to get peoples opinions on this, esp the workaround for the typenum regression since if we were to stabilize this + that hack we couldnt remove the latter without also removing the former which could break code relying on the inference improvements gained here.

@jackh726
Copy link
Member

jackh726 commented Aug 7, 2022

Going to mark this as a waiting on types team.

@jackh726 jackh726 added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Aug 7, 2022
@BoxyUwU BoxyUwU force-pushed the lots_of_obligations branch from 275bc1a to 431460d Compare September 8, 2022 16:20
@compiler-errors
Copy link
Member

@bors try

@bors
Copy link
Contributor

bors commented Sep 8, 2022

⌛ Trying commit 431460d4a724b96af190d4bb91a5040a1ba1ab32 with merge ae78d5a6ece2513cec91dad9a182fabcaa5a43d6...

@compiler-errors
Copy link
Member

nvm boxy said she was not yet done

@bors
Copy link
Contributor

bors commented Sep 8, 2022

💔 Test failed - checks-actions

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 8, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Sep 13, 2022

☔ The latest upstream changes (presumably #96709) made this pull request unmergeable. Please resolve the merge conflicts.

@BoxyUwU BoxyUwU force-pushed the lots_of_obligations branch from 3d9343b to 686df5f Compare September 21, 2022 09:44
@bors
Copy link
Contributor

bors commented Sep 26, 2022

☔ The latest upstream changes (presumably #102324) made this pull request unmergeable. Please resolve the merge conflicts.

@apiraino
Copy link
Contributor

apiraino commented Nov 3, 2022

checking this PR, with regard to this comment: is there anything planned (or already discussed) from team Types?

cc @rust-lang/types

@jackh726
Copy link
Member

jackh726 commented Nov 3, 2022

Going to mark this as blocked as waiting for non-fatal recursive errors. @lcnr is working on this AFAIK.

@jackh726 jackh726 added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels Nov 3, 2022
@BoxyUwU
Copy link
Member Author

BoxyUwU commented Jan 11, 2023

Gonna close this since there is no chance it gets merged any time soon. non fatal recursive errors is unlikely to happen until we get the new solver

@BoxyUwU BoxyUwU closed this Jan 11, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2023
…, r=lcnr

Implement `deferred_projection_equality` for erica solver

Somewhat of a revival of rust-lang#96912. When relating projections now emit an `AliasEq` obligation instead of attempting to determine equality of projections that may not be as normalized as possible (i.e. because of lazy norm, or just containing inference variables that prevent us from resolving an impl). Only do this when the new solver is enabled
Jarcho pushed a commit to Jarcho/rust that referenced this pull request Feb 26, 2023
…, r=lcnr

Implement `deferred_projection_equality` for erica solver

Somewhat of a revival of rust-lang#96912. When relating projections now emit an `AliasEq` obligation instead of attempting to determine equality of projections that may not be as normalized as possible (i.e. because of lazy norm, or just containing inference variables that prevent us from resolving an impl). Only do this when the new solver is enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error typechecking lifetime-GAT bound when "parent" bound is inferred
8 participants