-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Don't immediately error for cycles during normalization #75494
Don't immediately error for cycles during normalization #75494
Conversation
@bors p=1 Once approved we want this to be in ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I understand the strategy now, it's not once I had ever considered. Interesting. Also, a good example to try throwing at chalk, I've been wanting to create realistic examples of cycles (or near cycles) that arise during projection.
selcx: &mut SelectionContext<'cx, 'tcx>, | ||
obligation: &PolyProjectionObligation<'tcx>, | ||
) -> Result<Option<Vec<PredicateObligation<'tcx>>>, MismatchedProjectionTypes<'tcx>> { | ||
) -> Result< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this is a complex return type! I thnk the doc comment could be extended to explain what the various return values mean.
// Let the caller handle the recursion | ||
Ok(Err(project::InProgress)) => ProcessResult::Changed(mk_pending(vec![ | ||
project_obligation.with(project_obligation.predicate.to_predicate(tcx)), | ||
])), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I see, so we basically just push the project predicate back up to the caller... interesting...
@bors r+ |
📌 Commit 8e81710685349464553b30c0a7e89c50eb4d3b24 has been approved by |
Er, @bors r- r=me with the nit addressed |
Or just r+ if we think it's important enough |
heavily discussed in T-compiler meeting. This is a subtle change to subtle code. We've also agreed on backporting it and fire a crater run as soon as possible, which probably won't be on time but would give as an advantage to act quickly if there are bad consequences. @rustbot modify labels: beta-accepted |
8e81710
to
67fb583
Compare
@bors r=nikomatsakis |
📌 Commit 67fb583 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
#73452 meant some normalization cycles could be detected earlier, breaking some code.
This PR makes defers errors for normalization cycles to fulfillment, fixing said code.
Fixes #74868
r? @nikomatsakis