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

add suggestion for inverted function parameters #54804

Merged
merged 1 commit into from Oct 6, 2018

Conversation

Projects
None yet
5 participants
@euclio
Contributor

euclio commented Oct 4, 2018

Fixes #54065.

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Oct 4, 2018

Collaborator

r? @michaelwoerister

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

Collaborator

rust-highfive commented Oct 4, 2018

r? @michaelwoerister

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

@michaelwoerister

This comment has been minimized.

Show comment
Hide comment
@michaelwoerister

michaelwoerister Oct 4, 2018

Contributor

Thanks for the PR, @euclio!
r? @estebank

Contributor

michaelwoerister commented Oct 4, 2018

Thanks for the PR, @euclio!
r? @estebank

@estebank

I like it but I'm worried about what the suggestion will look in the case of a simple missing colon. Alas, this is the parser so there's no way of knowing wether an ident is an existing type or a new binding...

Couple of smaller changes requested.

Show resolved Hide resolved src/libsyntax/parse/parser.rs Outdated
Show resolved Hide resolved src/test/ui/parser/inverted-parameters.rs
Show outdated Hide outdated src/libsyntax/parse/parser.rs Outdated
Show outdated Hide outdated src/libsyntax/parse/parser.rs Outdated
Show outdated Hide outdated src/test/ui/parser/inverted-parameters.stderr Outdated
@euclio

This comment has been minimized.

Show comment
Hide comment
@euclio

euclio Oct 5, 2018

Contributor

@estebank Ready for another review.

Contributor

euclio commented Oct 5, 2018

@estebank Ready for another review.

@estebank

This comment has been minimized.

Show comment
Hide comment
@estebank

estebank Oct 5, 2018

Contributor

@bors r+ rollup

Contributor

estebank commented Oct 5, 2018

@bors r+ rollup

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Oct 5, 2018

Contributor

📌 Commit f5db411 has been approved by estebank

Contributor

bors commented Oct 5, 2018

📌 Commit f5db411 has been approved by estebank

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 5, 2018

Rollup merge of rust-lang#54804 - euclio:inverted-parameters, r=estebank
add suggestion for inverted function parameters

Fixes rust-lang#54065.

bors added a commit that referenced this pull request Oct 6, 2018

Auto merge of #54859 - pietroalbini:rollup, r=pietroalbini
Rollup of 11 pull requests

Successful merges:

 - #54078 (Expand the documentation for the `std::sync` module)
 - #54717 (Cleanup rustc/ty part 1)
 - #54781 (Add examples to `TyKind::FnDef` and `TyKind::FnPtr` docs)
 - #54787 (Only warn about unused `mut` in user-written code)
 - #54804 (add suggestion for inverted function parameters)
 - #54812 (Regression test for #32382.)
 - #54833 (make `Parser::parse_foreign_item()` return a foreign item or error)
 - #54834 (rustdoc: overflow:auto doesn't work nicely on small screens)
 - #54838 (Fix typo in src/libsyntax/parse/parser.rs)
 - #54851 (Fix a regression in 1.30 by reverting #53564)
 - #54853 (Remove unneccessary error from test, revealing NLL error.)

Failed merges:

r? @ghost

@bors bors merged commit f5db411 into rust-lang:master Oct 6, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment