Autoderef when suggesting to call (self.field)#32712
Merged
bors merged 3 commits intorust-lang:masterfrom Apr 5, 2016
jonas-schievink:autoderef-fields-for-fn-ty
Merged
Autoderef when suggesting to call (self.field)#32712bors merged 3 commits intorust-lang:masterfrom jonas-schievink:autoderef-fields-for-fn-ty
(self.field)#32712bors merged 3 commits intorust-lang:masterfrom
jonas-schievink:autoderef-fields-for-fn-ty
Conversation
Contributor
|
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
| }) | ||
| }); | ||
|
|
||
| match opt_is_fn { |
Contributor
Author
There was a problem hiding this comment.
Gah, of course. Fixed.
| let mut selcx = SelectionContext::new(infcx); | ||
|
|
||
| if selcx.evaluate_obligation(&obligation) { | ||
| Some(true) |
Member
There was a problem hiding this comment.
Nit: I can’t find Some(false) ever getting emitted. Couldn’t you just return Some(()) and then interpret the discriminant as boolean with .is_some() instead?
Contributor
Author
There was a problem hiding this comment.
Yes, sure. I just got caught up in a mess of bools I think :-)
This should be better.
Member
|
This seems good to me. r=me with nit fixed or well objected to. |
Member
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Apr 5, 2016
…r-fn-ty, r=nagisa Autoderef when suggesting to call `(self.field)` Fixes rust-lang#32128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32128