Skip to content
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

Suggest the pat_param specifier before | on 2021 edition #91385

Merged
merged 3 commits into from
Dec 4, 2021

Conversation

ecstatic-morse
Copy link
Contributor

Ran into this today after writing some Rust for the first time in a while.

r? @estebank

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 30, 2021
We have a migration warning but no lint for users who have enabled the
new edition.
@rust-log-analyzer

This comment has been minimized.

@ecstatic-morse
Copy link
Contributor Author

The test in the third commit seems to be the same as the one in the second. I guess one is supposed to not have edition=2021?

@apiraino apiraino added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Dec 1, 2021
@joshtriplett
Copy link
Member

Looks like a great improvement!

@estebank
Copy link
Contributor

estebank commented Dec 2, 2021

@ecstatic-morse yeah, that seems like a preexisting mistake (the path implies that these might be duplicated to begin with). I would remove the edition flag on one of them (and rename it to make it clearer it is <=2018).

r=me with that change and squashed commits.

@ecstatic-morse
Copy link
Contributor Author

So there's already another pre-2021 test that is identical macro-pat-pattern-followed-by-or-in-2021.macro-pat2021-pattern-followed-by-or is different in a few places. I think we should just leave it.

@estebank
Copy link
Contributor

estebank commented Dec 3, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Dec 3, 2021

📌 Commit bfd95e1 has been approved by estebank

@bors bors 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 Dec 3, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 4, 2021
…askrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#90538 (Document how recursion is handled for `ty::Ty`)
 - rust-lang#90851 (Add unchecked downcast methods)
 - rust-lang#91209 (Implement ``@snapshot`` check for htmldocck)
 - rust-lang#91385 (Suggest the `pat_param` specifier before `|` on 2021 edition )
 - rust-lang#91478 (Remove incorrect newline from float cast suggestion)
 - rust-lang#91481 (Use let_else in some more places in rustc_lint)
 - rust-lang#91488 (Fix ICE when `yield`ing in function returning `impl Trait`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2b64476 into rust-lang:master Dec 4, 2021
@rustbot rustbot added this to the 1.59.0 milestone Dec 4, 2021
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants