-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking issue for ..X, and ..=X (#![feature(half_open_range_patterns)]) #67264
Copy link
Copy link
Open
Labels
A-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-exclusive_range_pattern`#![feature(exclusive_range_pattern)]``#![feature(exclusive_range_pattern)]`F-half_open_range_patterns`#![feature(half_open_range_patterns)]``#![feature(half_open_range_patterns)]`S-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Metadata
Metadata
Assignees
Labels
A-patternsRelating to patterns and pattern matchingRelating to patterns and pattern matchingB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-exclusive_range_pattern`#![feature(exclusive_range_pattern)]``#![feature(exclusive_range_pattern)]`F-half_open_range_patterns`#![feature(half_open_range_patterns)]``#![feature(half_open_range_patterns)]`S-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.T-langRelevant to the language teamRelevant to the language teamdisposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Rejected/Not lang
X..was stabilized in #83918..=Xwas stabilized in #102275...Xwas removed in #68120..Xis tracked in #37854X..patterns in slices are currently gated viahalf_open_range_patterns_in_slicesThis is a tracking issue for the feature gate
#![feature(half_open_range_patterns)]. This feature provides half-open range patternsX..,..X,..=X, and...X(last one is also deprecated likeX...Yis, for spec & implementation simplicity). These correspond to theRangeFrom,RangeTo,RangeToInclusive, andRangeToInclusiveexpression forms, with the same syntaxes, respectively. The correspondence is both syntactic and semantic (in the sense that e.g. aX..pattern matching on a scrutineesholds exactly when(X..).contains(&s)holds). For implementations details, see #67258.The implementation for the feature was introduced in #67258 and is also strongly related to
# which is also required forX..and..X(as theRangeEnd::Exclusivesyntax is used).Steps:
half_open_range_patternshave had some time to bake on nightly, write up an RFC specifying bothexclusive_range_patternandhalf_open_rangeand proposing their stabilization.Unresolved questions:
..Xfor signed types being from -i32::MAX -- is that OK? Too confusing? EDIT: Lang team considers this acceptable, leaving open the possibility of future lints to help catch mistakes.