Closed
Description
Current status
We are planning to to change the syntax for inclusive ranges and patterns to ..=
. The ...
syntax in patterns is stable and will remain (silently) deprecated for the time being; rustfmt can rewrite ...
to ..=
. This comes after much discussion. See this comment for justification.
No more syntax discussion should be had in this thread. Any different proposals of exclusive range syntax should take place on the user's forum or internals forum, after you have read all existing comments and their rationale here. Notably, breaking backwards compatibility is a non-starter.
Steps to take
- Initial implementation
- Change to accept
..=
as synonym for...
in patterns and to accept..=
in expressions Initial support for..=
syntax #44709 - Documentation
- Make RangeInclusive just a two-field struct (amend 1192) rfcs#1980 proposed a tweak to
RangeInclusive
- Stabilization Stabilize inclusive range (
..=
) #47813- Note: The fields of
RangeInclusive
have been left out from this round of stabilization. Please track Tracking issue forstart
,end
andnew
methods of RangeInclusive #49022 on this feature.
- Note: The fields of
Metadata
Metadata
Assignees
Labels
Blocker: Approved by a merged RFC and implemented but not stabilized.Blocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the language team, which will review and decide on the PR/issue.Relevant to the library API 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.