Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

unify IsPattern and IsImport enum in show_candidates #102913

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

SparrowLii
Copy link
Member

@SparrowLii SparrowLii commented Oct 11, 2022

Follow-up of #102876
A binding cannot appear in both pattern and import at the same time, so it makes sense to unify them
r? @compiler-errors

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Oct 11, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2022
/// Whether a binding is part of a pattern or an expression. Used for diagnostics.
enum IsPattern {
/// Whether a binding is part of a pattern or a use statement. Used for diagnostics.
enum Mode {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe DiagnosticMode? r=me after giving it a better name than just Mode.

Copy link
Member Author

@SparrowLii SparrowLii Oct 12, 2022

Choose a reason for hiding this comment

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

Done. But I don't have privileges, so I still need you to r+

@SparrowLii
Copy link
Member Author

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Oct 12, 2022

@SparrowLii: 🔑 Insufficient privileges: Not in reviewers

@compiler-errors
Copy link
Member

I will r+ it once CI turns green.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 12, 2022

📌 Commit a7f58af has been approved by compiler-errors

It is now in the queue for this repository.

@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 Oct 12, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 12, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#102110 (Migrate rustc_passes diagnostics)
 - rust-lang#102187 (Use correct location for type tests in promoted constants)
 - rust-lang#102239 (Move style guide to rust-lang/rust)
 - rust-lang#102578 (Panic for invalid arguments of `{integer primitive}::ilog{,2,10}` in all modes)
 - rust-lang#102811 (Use memset to initialize readbuf)
 - rust-lang#102890 (Check representability in adt_sized_constraint)
 - rust-lang#102913 (unify `IsPattern` and `IsImport` enum in `show_candidates`)
 - rust-lang#102924 (rustdoc: remove unused classes from sidebar links)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 252ce10 into rust-lang:master Oct 12, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 12, 2022
# for free to join this conversation on GitHub. Already have an account? # 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.

5 participants