Skip to content

Tracking issue for exclusive range patterns #37854

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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 teamdisposition-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