Repository navigation
Tweak suggestion of "unreachable due to never pattern" - #163764
Merged
Merged
Conversation
Collaborator
|
rustbot has assigned @dingxiangfei2009. Use Why was this reviewer chosen?The reviewer was selected based on:
|
fmease
approved these changes
Nov 1, 2026
Member
There was a problem hiding this comment.
Thanks! I'll approve since it fixes the suggestion but note that bodiless arms won't stay around: #153134 (comment).
@bors r+ rollup
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Nov 2, 2026
… r=fmease Tweak suggestion of "unreachable due to never pattern" Use more accurate span when suggesting to remove guard and body of a never-pattern match arm (`feature(never_patterns)`]. ``` error: a guard on a never pattern will never be run --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:8:13 | LL | false | ^^^^^ | help: remove the guard, leaving only the pattern | LL - Some(!) LL - LL - if #[deny(unused_mut)] LL - false LL + Some(!) | ```
Member
|
Contributor
|
This pull request was unapproved. This PR was contained in a rollup (#165312), which was unapproved. |
estebank
force-pushed
the
never-pattern-suggestion
branch
from
November 2, 2026 04:51
ca3c628 to
6ea5072
Compare
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. |
Use more accurate span when suggesting to remove guard and body of a never-pattern match arm (`feature(never_patterns)`]. ``` error: a guard on a never pattern will never be run --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:8:13 | LL | false | ^^^^^ | help: remove the guard, leaving only the pattern | LL - Some(!) LL - LL - if #[deny(unused_mut)] LL - false LL + Some(!) | ```
estebank
force-pushed
the
never-pattern-suggestion
branch
from
November 2, 2026 04:51
6ea5072 to
4b9c00c
Compare
Contributor
Author
|
@bors r=fmease |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
…uwer Rollup of 6 pull requests Successful merges: - #163764 (Tweak suggestion of "unreachable due to never pattern") - #164771 (std: fix platform checks for hermit) - #165070 (create mir for direct-rhs consts) - #165121 (test DSL evaluate sequentially) - #165288 (Add assembly test for masked index without redundant shifts) - #165307 (test(lexer): Add test that ZWJ/ZWNJ are accepted in identifiers)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 2, 2026
Rollup merge of #163764 - estebank:never-pattern-suggestion, r=fmease Tweak suggestion of "unreachable due to never pattern" Use more accurate span when suggesting to remove guard and body of a never-pattern match arm (`feature(never_patterns)`]. ``` error: a guard on a never pattern will never be run --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:8:13 | LL | false | ^^^^^ | help: remove the guard, leaving only the pattern | LL - Some(!) LL - LL - if #[deny(unused_mut)] LL - false LL + Some(!) | ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use more accurate span when suggesting to remove guard and body of a never-pattern match arm (
feature(never_patterns)].