-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Pull implied bound computation out of borrowck #152051
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
base: main
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
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.
This change in this file is mainly duplicating the existing function to not use nll var. The new implied bound query needs these functions, but it doesn't makes sense to use nll var there. boxy gave some ideas on how to deduplicate this, but I haven't got to it yet.
This comment has been minimized.
This comment has been minimized.
| if let Ok(bounds) = compute_implied_outlives_bounds_inner(&ocx, param_env, ty, span, false) | ||
| { | ||
| outlives_bounds.extend(bounds); | ||
| } |
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.
we have a first implied bound computation call here
| if ty != norm_ty { | ||
| if let Ok(bounds) = | ||
| compute_implied_outlives_bounds_inner(&ocx, param_env, norm_ty, span, false) | ||
| { | ||
| outlives_bounds.extend(bounds); |
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.
and this is the second one.
Open this draft PR so it's easier to discuss, feel free to point out any logic / soundness / error handling issues :>
Current status: