-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fix regression: account for trait methods in arg count mismatch error #47844
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
cc @estebank (Complete off-topic: I already made an earlier PR#47083, why did I get the first-time greeting from highfive?) |
I should probably add a test for this. I can do that about 17 hours from now when I hit the machine where I've got the repo checked out and set up already, or someone else is free to add the test case I posted in the linked issue comment. |
@CAD97 this looks great! Please squash the commits you have added when you put up the test case. r=me once the test case is added. |
@CAD97 thank you for following up and adding a fix. I would prefer it if it had a test case in the same commit for easier historical tracking. We can wait another 8 hours for it :) |
Test added and squashed! r? @pnkfelix |
|
Yeah, working on it |
a19e701
to
217efbb
Compare
That should fix the tidy issue. or not >.> |
src/test/ui/issue-47706-trait.rs
Outdated
None::<()>.map(Self::f); | ||
} | ||
//~^^ ERROR function is expected to take a single 0-tuple as argument, | ||
//~^^ but it takes 2 distinct arguments [E0593] |
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.
Just remove line 16, line 15 will match the beginning and work as expected.
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.
Well, I did something wrong I guess (by putting on the tag?) https://travis-ci.org/rust-lang/rust/builds/334956316
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.
Yeah, just remove the [E0593]
and it should pass.
That should be everything. |
Travis passed. |
@bors r+ rollup |
📌 Commit c06c707 has been approved by |
Fix regression: account for trait methods in arg count mismatch error Fixed rust-lang#47706 (rust-lang#47706 (comment)) Original PR rust-lang#47747 missed methods on trait definitions. This edit was done in GitHub. I think I got the signature of the variant right, going by the ICE debug output and the other cases above.
Fixed #47706 (#47706 (comment))
Original PR #47747 missed methods on trait definitions.
This edit was done in GitHub. I think I got the signature of the variant right, going by the ICE debug output and the other cases above.