Skip to content
Permalink
Browse files

Stabilize the `matches!` macro

  • Loading branch information
SimonSapin committed Dec 27, 2019
1 parent 8f5f8f9 commit 1c572a2d6e7b9fe0d8dad4840c72ccc3f4add47b
Showing with 1 addition and 7 deletions.
  1. +1 −3 src/libcore/macros/mod.rs
  2. +0 −1 src/librustc_lint/lib.rs
  3. +0 −1 src/librustc_mir/lib.rs
  4. +0 −1 src/libstd/lib.rs
  5. +0 −1 src/libsyntax/lib.rs
@@ -252,16 +252,14 @@ macro_rules! debug_assert_ne {
/// # Examples
///
/// ```
/// #![feature(matches_macro)]
///
/// let foo = 'f';
/// assert!(matches!(foo, 'A'..='Z' | 'a'..='z'));
///
/// let bar = Some(4);
/// assert!(matches!(bar, Some(x) if x > 2));
/// ```
#[macro_export]
#[unstable(feature = "matches_macro", issue = "65721")]
#[stable(feature = "matches_macro", since = "1.42.0")]
macro_rules! matches {
($expression:expr, $( $pattern:pat )|+ $( if $guard: expr )?) => {
match $expression {
@@ -15,7 +15,6 @@
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(nll)]
#![feature(matches_macro)]
#![recursion_limit = "256"]

#[macro_use]
@@ -29,7 +29,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![feature(range_is_empty)]
#![feature(stmt_expr_attributes)]
#![feature(trait_alias)]
#![feature(matches_macro)]
#![recursion_limit = "256"]

#[macro_use]
@@ -276,7 +276,6 @@
#![feature(linkage)]
#![feature(log_syntax)]
#![feature(manually_drop_take)]
#![feature(matches_macro)]
#![feature(maybe_uninit_ref)]
#![feature(maybe_uninit_slice)]
#![feature(needs_panic_runtime)]
@@ -11,7 +11,6 @@
#![feature(const_transmute)]
#![feature(crate_visibility_modifier)]
#![feature(label_break_value)]
#![feature(matches_macro)]
#![feature(nll)]
#![feature(try_trait)]
#![feature(slice_patterns)]

0 comments on commit 1c572a2

Please sign in to comment.
You can’t perform that action at this time.