Uh oh!
There was an error while loading. Please reload this page.
Cast suggestions - #38099
Conversation
5c5e1e8 to
3fb3239CompareThere was a problem hiding this comment.
@nikomatsakis: This matching is invalid, but I don't know what to put here. We don't have a method name to refer to, just a return type. Won't it always return the same method if I match on it?
@eddyb: Maybe you have an idea here?
There was a problem hiding this comment.
Yeah, this method should go away. Callers can just use impl_or_trait_item instead. I've got a local branch doing that (might also try modifying impl_or_trait_item to return impl Iterator, since right now it only considers the first method that matches the return type...?)
nikomatsakis
left a comment
There was a problem hiding this comment.
Looking good. You're right about associated_item being wrong now though.
There was a problem hiding this comment.
Nit: newline before -> here
There was a problem hiding this comment.
Not: has_no_input_arg or does_not_have_input_arg or !self.has_input_arg :)
There was a problem hiding this comment.
Yeah, this method should go away. Callers can just use impl_or_trait_item instead. I've got a local branch doing that (might also try modifying impl_or_trait_item to return impl Iterator, since right now it only considers the first method that matches the return type...?)
There was a problem hiding this comment.
are these changes that suggest a & still in the PR?
There was a problem hiding this comment.
I couldn't test since the current code was wrong. Once updated, this will follow.
nikomatsakis
commented
Dec 1, 2016
OK, so, I pushed a quick fix, but we still fail 3 compile-fail tests. I'm not 100% sure why, didn't dig into it yet: each of them fails with a rather useless "error: the type of this value must be known in this context". |
GuillaumeGomez
commented
Dec 2, 2016
@nikomatsakis: We have an issue. With the current code, it only returns one proposition. For example for the following code: fnfoo(_x:String){}fnmain(){foo("a");}It proposes only |
nikomatsakis
commented
Dec 2, 2016
I think that is because the |
GuillaumeGomez
commented
Dec 2, 2016
Indeed. I'll give it a try then. |
Ok, so I fixed this issue. Code is a bit ugly unfortunately. We still have the same failure for the 3 tests. EDIT: Oh also, suggestions are completely stupid haha. |
bors
commented
Dec 3, 2016
☔ The latest upstream changes (presumably #38079) made this pull request unmergeable. Please resolve the merge conflicts. |
df0ebff to
0b433e9Comparenikomatsakis
commented
Dec 9, 2016
@GuillaumeGomez I pushed a commit that cleans up the code a bit, but I still see various failures around inference that I think we need to track down: |
nikomatsakis
commented
Dec 9, 2016
OK, I see those errors were the cause of your changes to not call BTW, did you have some suggestion tests that were failing because of the fact that we were returning an |
b7dc50f to
05d1958CompareGuillaumeGomez
commented
Dec 9, 2016
I ran |
GuillaumeGomez
commented
Dec 9, 2016
I fixed the linter as well. |
nikomatsakis
commented
Dec 9, 2016
@GuillaumeGomez still some kind of issue... |
GuillaumeGomez
commented
Dec 10, 2016
@nikomatsakis: If you're referring to travis' failure, it seems normal. If not, then what are you referring to? |
nikomatsakis
commented
Dec 12, 2016
I see this, is that normal? |
nikomatsakis
commented
Dec 12, 2016
I guess that particular configuration does seem to typically have a travis failure of some kind. |
Mark-Simulacrum
commented
Dec 12, 2016
I think that error might be from #38097, where |
GuillaumeGomez
commented
Dec 12, 2016
Uh?! I guess I failed my update and my rebuild... Taking another look then. |
5816ccc to
e2c5370CompareSo as I thought, I needed to rebase once again. Now it's fixed and tests are passing again. |
nikomatsakis
commented
Dec 19, 2016
@GuillaumeGomez sadly it seems like travis is still unhappy! The Some of the output: |
When we are scanning for suggestions, an unresolved inference variable is not a hard error.
e2c5370 to
28e2c6aCompareGuillaumeGomez
commented
Dec 20, 2016
@nikomatsakis: Indeed, didn't see this one. Should be fixed now. |
GuillaumeGomez
commented
Dec 20, 2016
And travis tests passed! \o/ |
GuillaumeGomez
commented
Dec 20, 2016
@nikomatsakis: no r+? |
nikomatsakis
commented
Dec 20, 2016
@bors r+ |
bors
commented
Dec 20, 2016
📌 Commit 28e2c6a has been approved by |
bors
commented
Dec 21, 2016
⌛ Testing commit 28e2c6a with merge 439c312... |
bors
commented
Dec 21, 2016
This removes the safe_suggestion feature from feature_gate.rs. It was added in commit 164f010 and then removed again in commit c11fe55 . As the removal was in the same PR rust-lang#38099 as the addition, we don't move it to the "removed" section. Removes an element from the whitelist of non gate tested unstable lang features (issue rust-lang#39059).
Mark safe_suggestion and pushpop_unsafe as removed in feature_gate.rs This removes two features from feature_gate.rs: `safe_suggestion` and `pushpop_unsafe`. Both had been removed in other places already, but were forgotten to be removed from feature_gate.rs. * `safe_suggestion` was added in commit 164f010 and then removed again in commit c11fe55 both in the same PR #38099. * `pushpop_unsafe` was added in commit 1829fa5 and removed again in commit d399098 Removes two elements from the whitelist of non gate tested unstable lang features (issue #39059).
Mark safe_suggestion and pushpop_unsafe as removed in feature_gate.rs This removes two features from feature_gate.rs: `safe_suggestion` and `pushpop_unsafe`. Both had been removed in other places already, but were forgotten to be removed from feature_gate.rs. * `safe_suggestion` was added in commit 164f010 and then removed again in commit c11fe55 both in the same PR #38099. * `pushpop_unsafe` was added in commit 1829fa5 and removed again in commit d399098 Removes two elements from the whitelist of non gate tested unstable lang features (issue #39059).
r? @nikomatsakis