Skip to content
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

Plumb obligations through librustc/infer #32596

Merged
merged 2 commits into from
Apr 5, 2016
Merged

Conversation

soltanmm
Copy link

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

{
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 })
Copy link
Contributor

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()

@nikomatsakis
Copy link
Contributor

Looks great. r=me with nits addressed:

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Apr 4, 2016

📌 Commit 86071ac has been approved by nikomatsakis

Manishearth added a commit to Manishearth/rust that referenced this pull request Apr 5, 2016
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
bors added a commit that referenced this pull request Apr 5, 2016
Rollup of 11 pull requests

- Successful merges: #32403, #32596, #32675, #32678, #32685, #32686, #32692, #32710, #32712, #32714, #32715
- Failed merges: #32488
@bors bors merged commit 86071ac into rust-lang:master Apr 5, 2016
@nikomatsakis
Copy link
Contributor

🎆 I feel like this PR has been a long time coming. Thanks for sticking with it @soltanmm. (OK, now onto the next step...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants