Skip to content

Tracking issue for exclusive range patterns #37854

Closed
@oli-obk

Description

@oli-obk

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

History and status

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-exclusive_range_pattern`#![feature(exclusive_range_pattern)]`T-langRelevant to the language team, which will review and decide on the PR/issue.disposition-mergeThis 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.relnotesMarks issues that should be documented in the release notes of the next release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions