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

rustc_mir_build: Enforce rustc::potential_query_instability lint #118863

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

Enselic
Copy link
Member

@Enselic Enselic commented Dec 12, 2023

Stop allowing rustc::potential_query_instability on all of rustc_mir_build and instead allow it on a case-by-case basis if it is safe to do so. In this crate there was only one instance of the lint, and it was safe to allow.

Part of #84447 which is E-help-wanted.

@rustbot
Copy link
Collaborator

rustbot commented Dec 12, 2023

r? @davidtwco

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 12, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 12, 2023

Some changes might have occurred in exhaustiveness checking

cc @Nadrieril

@Enselic Enselic force-pushed the rustc_mir-build-query-stability branch from 3e442fc to 9c6d5d1 Compare December 14, 2023 15:45
// Look at the first witness.
collect_non_exhaustive_tys(cx, &witnesses[0], &mut non_exhaustive_tys);

// Make order of diagnostics deterministic.
non_exhaustive_tys.sort();
Copy link
Member

Choose a reason for hiding this comment

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

FxIndexSet will maintain its insertion order as the iteration order. Since it is filled in a deterministic way, we don't need to do any sorting (and also don't need to #[allow] the lint below).

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, good catch, thanks. Done.

Stop allowing `rustc::potential_query_instability` on all of
`rustc_mir_build` and instead allow it on a case-by-case basis if it is
safe to do so. In this crate there was no instance of the lint
remaining.
@Enselic Enselic force-pushed the rustc_mir-build-query-stability branch from 9c6d5d1 to 5644a53 Compare December 14, 2023 16:33
@michaelwoerister
Copy link
Member

Thanks, @Enselic!
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 15, 2023

📌 Commit 5644a53 has been approved by michaelwoerister

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 Dec 15, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 15, 2023
…llaumeGomez

Rollup of 4 pull requests

Successful merges:

 - rust-lang#113091 (Don't merge cfg and doc(cfg) attributes for re-exports)
 - rust-lang#115660 (rustdoc: allow resizing the sidebar / hiding the top bar)
 - rust-lang#118863 (rustc_mir_build: Enforce `rustc::potential_query_instability` lint)
 - rust-lang#118909 (Some cleanup and improvement for invalid ref casting impl)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d3d0287 into rust-lang:master Dec 15, 2023
11 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 15, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 15, 2023
Rollup merge of rust-lang#118863 - Enselic:rustc_mir-build-query-stability, r=michaelwoerister

rustc_mir_build: Enforce `rustc::potential_query_instability` lint

Stop allowing `rustc::potential_query_instability` on all of `rustc_mir_build` and instead allow it on a case-by-case basis if it is safe to do so. In this crate there was only one instance of the lint, and it was safe to allow.

Part of rust-lang#84447 which is E-help-wanted.
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.

6 participants