-
-
Notifications
You must be signed in to change notification settings - Fork 15.6k
trait_selection: Keep type-op region constraints in borrowck #161423
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -374,6 +374,11 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate< | |
| region_obligations, | ||
| region_constraints, | ||
| region_assumptions, | ||
| // We're only called with `-Zassumptions-on-binders` disabled, in which | ||
| // case the solver never emits new-style region constraints. With it | ||
| // enabled the solver instead returns `ExternalRegionConstraints::NextGen`, | ||
| // reading the constraint straight out of the `InferCtxt`. | ||
| Default::default(), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment about why we ignore new style constraints here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added. Short version is this only runs with the flag off, and with the flag off the solver never makes new style constraints in the first place. Turn it on and we go down the NextGen path instead, which reads the tree straight off the Took me a minute to talk myself into that when I first passed the empty default in, so the comment probably saves the next person the same trip. |
||
| ) | ||
| }); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.