Closed
Description
Summary
This feature allows exclusive integer ranges (such as 0..100
) in patterns.
fn is_digit(x: u32) -> bool {
match x {
0..10 => true,
10.. => false,
}
}
Concerns
Conflict with the syntax of slice patterns Tracking issue for RFC #495 (featuresslice_patterns
andadvanced_slice_patterns
) #23121- General concern about the syntax of inclusive/exclusive patterns
History and status
- Proposed and implemented in PR exclusive range patterns #35712
- approved provisionally by lang team without an RFC
Metadata
Metadata
Assignees
Labels
Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFC`#![feature(exclusive_range_pattern)]`Relevant to the language team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.Marks issues that should be documented in the release notes of the next release.