-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Plumb obligations through librustc/infer #32596
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
Conversation
{ | ||
self.commit_if_ok(|_| { | ||
let trace = TypeTrace::types(origin, a_is_expected, a, b); | ||
self.equate(a_is_expected, trace, &a, &b).map(|_| ()) | ||
self.equate(a_is_expected, trace, &a, &b) | ||
.map(|InferOk { obligations, .. }| InferOk { value: (), obligations: obligations }) |
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: seems worth it to add a helper for this; like |ok| ok.unit()
Looks great. r=me with nits addressed:
|
@bors r+ |
📌 Commit 86071ac has been approved by |
Plumb obligations through librustc/infer Like rust-lang#32542, but more like rust-lang#31867. TODO before merge: make an issue for the propagation of obligations through... uh, everywhere... then replace the `#????`s with the actual issue number. cc @jroesch r? @nikomatsakis
🎆 I feel like this PR has been a long time coming. Thanks for sticking with it @soltanmm. (OK, now onto the next step...) |
Like #32542, but more like #31867.
TODO before merge: make an issue for the propagation of obligations through... uh, everywhere... then replace the
#????
s with the actual issue number.cc @jroesch
r? @nikomatsakis