-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
exclusive_range_pattern error is unhelpful #120047
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.F-exclusive_range_pattern`#![feature(exclusive_range_pattern)]``#![feature(exclusive_range_pattern)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.Diagnostics: An error or lint that doesn't give enough information about the problem at hand.F-exclusive_range_pattern`#![feature(exclusive_range_pattern)]``#![feature(exclusive_range_pattern)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
Current output
Desired output
Rationale and extra context
Came across this when a beginner was very confused about what was wrong with their
match; the words "is experimental" and the link to the issue was not sufficient for their discovering what the problem/solution was.The suggested inclusive range pattern doesn't need to contain the actual matching value if producing it is hard or impossible, printing something like
use an inclusive range pattern, like N..=Mis still better than nothing.This issue may of course be ignored/closed if this nightly feature is just about ready to be stabilized or something.
Other cases
No response
Rust Version
Anything else?
@rustbot label +D-terse +C-enhancement +F-exclusive_range_pattern