Skip to content

Provide the full span of method calls to check_argument_types #45123

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

Merged
merged 1 commit into from
Oct 15, 2017

Conversation

goffrie
Copy link
Contributor

@goffrie goffrie commented Oct 9, 2017

... so that it includes the span of the passed arguments, not just the name of the called method.

Fixes #44760.

@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@eddyb
Copy link
Member

eddyb commented Oct 9, 2017

r? @oli-obk

@oli-obk
Copy link
Contributor

oli-obk commented Oct 9, 2017

You need to fix method-call-err-msg.rs , too. This will include the args on other errors, too. can you add examples of those errors as ui tests, so we know how they look now? Maybe just move method-call-err-msg.rs to ui tests

@carols10cents carols10cents added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 9, 2017
@goffrie goffrie force-pushed the fix-method-unit-call branch from 5736fca to 53a10a4 Compare October 10, 2017 01:57
@goffrie
Copy link
Contributor Author

goffrie commented Oct 10, 2017

I moved it to ui tests. I don't know if the new output is really great though, maybe it should just point at the parens

26 | | //~^ NOTE expected 0 parameters
27 | | //~^ ERROR this function takes 1 parameter but 0 parameters were supplied
28 | | //~^ NOTE expected 1 parameter
29 | | .one()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a definite regression. It used to produce

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
  --> src/main.rs:15:7
   |
5  |      fn one(self, _: isize) -> Foo { self }
   |      -------------------------------------- defined here
...
15 |      .one()     //~ ERROR this function takes 1 parameter but 0 parameters were supplied
   |       ^^^ expected 1 parameter

And we really want to keep the old report

@goffrie goffrie force-pushed the fix-method-unit-call branch from 53a10a4 to bb4d1ca Compare October 14, 2017 03:20
@goffrie
Copy link
Contributor Author

goffrie commented Oct 14, 2017

updated to keep the old error message

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 15, 2017
@oli-obk
Copy link
Contributor

oli-obk commented Oct 15, 2017

Lgtm now. @eddyb can you r+?

@kennytm
Copy link
Member

kennytm commented Oct 15, 2017

@bors r=oli-obk

@bors
Copy link
Collaborator

bors commented Oct 15, 2017

📌 Commit bb4d1ca has been approved by oli-obk

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 15, 2017
@bors
Copy link
Collaborator

bors commented Oct 15, 2017

⌛ Testing commit bb4d1ca with merge df095ce...

bors added a commit that referenced this pull request Oct 15, 2017
Provide the full span of method calls to `check_argument_types`

... so that it includes the span of the passed arguments, not just the name of the called method.

Fixes #44760.
@bors
Copy link
Collaborator

bors commented Oct 15, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: oli-obk
Pushing df095ce to master...

@bors bors merged commit bb4d1ca into rust-lang:master Oct 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants