-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix trait solving ICEs #77720
Fix trait solving ICEs #77720
Conversation
I can confirm that this fixes #77656, and https://github.com/tavianator/acap builds successfully now. Thanks! |
☔ The latest upstream changes (presumably #77792) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
2916606
to
56015a5
Compare
@bors p=1 When this is merged it needs high priority because it fixes 2 |
If this needs "high priority", over rollups, it needs at least p=6: priorities 1 to 5 can be skipped by rollups |
I'm not sure if we have a policy but I'd make this kind of PR higher priority than rollups, yeah. |
I wasn't aware of that policy either before Manish mentioned it to me. then let's do @bors p=6 for when the PR is reviewed |
i > j && !needs_infer | ||
other.evaluation.must_apply_modulo_regions() | ||
&& !needs_infer | ||
&& (i < j || !victim.evaluation.must_apply_modulo_regions()) |
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.
Hmm I was worried when I read the PR description, but this is relatively narrowly tailored
So, r=me, but I'd be happy to talk about this more with @matthewjasper -- they seemed to indicate a desire to talk it over. I'm like a little nervous about the changes to prefer one predicate over another but these do seem pretty narrowly tailored, and they avoid inference effects, so I'm not that worried. |
After trying to find other options here there doesn't seem to be a much better solution without a much larger change here (e.g. making rustc more like chalk). I think that I slightly prefer this change, which simplifies how winnowing works in exchange for evaluating normalization cycles to @@ -521,12 +521,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
result
}
Ok(Ok(None)) => Ok(EvaluatedToAmbig),
- // EvaluatedToRecur might also be acceptable here, but use
- // Unknown for now because it means that we won't dismiss a
- // selection candidate solely because it has a projection
- // cycle. This is closest to the previous behavior of
- // immediately erroring.
- Ok(Err(project::InProgress)) => Ok(EvaluatedToUnknown),
+ Ok(Err(project::InProgress)) => Ok(EvaluatedToRecur),
Err(_) => Ok(EvaluatedToErr),
}
}
@@ -1387,9 +1382,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
| (ObjectCandidate(i), ObjectCandidate(j)) => {
// Arbitrarily pick the lower numbered candidate for backwards
// compatibility reasons. Don't let this affect inference.
- other.evaluation.must_apply_modulo_regions()
- && !needs_infer
- && (i < j || !victim.evaluation.must_apply_modulo_regions())
+ i < j && !needs_infer
}
(ObjectCandidate(_), ProjectionCandidate(_))
| (ProjectionCandidate(_), ObjectCandidate(_)) => { |
@matthewjasper hmm I think I might prefer that patch too. |
56015a5
to
8882455
Compare
@bors r=nikomatsakis |
📌 Commit 56015a58635d8275f52998c07276adf0aed18cbc has been approved by |
@bors retry |
@bors retry r- |
@bors r=nikomatsakis |
📌 Commit 56015a58635d8275f52998c07276adf0aed18cbc has been approved by |
@bors r- |
seeing if a force-push helps |
📌 Commit 64520d04b9eaa4899c1686ff02f9e51d0b8db5c4 has been approved by |
⌛ Testing commit 64520d04b9eaa4899c1686ff02f9e51d0b8db5c4 with merge 8c26ccaa0b4c073a3d4a129650a486587ce7aac4... |
💔 Test failed - checks-actions |
64520d0
to
50dde2e
Compare
@bors r=nikomatsakis |
📌 Commit 50dde2e has been approved by |
⌛ Testing commit 50dde2e with merge 1dc1166c4fd24c3625904339077abd92217a0c5c... |
☀️ Test successful - checks-actions, checks-azure |
👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward |
@bors retry |
☀️ Test successful - checks-actions, checks-azure |
over candidates that are not.
(this can happen due to cycles in normalization)
Closes #77653
Closes #77656
r? @nikomatsakis