Skip to content

Emit note for non_exhaustive within defining crate for unreachable_patterns - #164362

Open
mu001999 wants to merge 1 commit into
rust-lang:mainfrom
mu001999-contrib:note-for-non-exhaustive
Open

mu001999 wants to merge 1 commit into
rust-lang:mainfrom
mu001999-contrib:note-for-non-exhaustive

Conversation

@mu001999

Copy link
Copy Markdown
Member

Original issue: #159713

Previous PR: #160918

This PR adds a note to the unreachable_patterns lint explaining that #[non_exhaustive] does not affect exhaustiveness checking within the defining crate when the type is a local enum with the attr #[non_exhaustive].

@rustbot

rustbot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in match checking

cc @Nadrieril

@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 Oct 15, 2026
@rustbot

rustbot commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 17 candidates

@mu001999
mu001999 force-pushed the note-for-non-exhaustive branch from 582a6a7 to 8c8379d Compare November 9, 2026 03:10
@rustbot

rustbot commented Nov 9, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@mu001999
mu001999 force-pushed the note-for-non-exhaustive branch from 8c8379d to a12d2ae Compare November 9, 2026 05:57
@mu001999

mu001999 commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@rustbot reroll

@rustbot rustbot assigned fmease and unassigned davidtwco Nov 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants