Skip to content

Commit 335c887

Browse files
authored
Rollup merge of rust-lang#67659 - SimonSapin:matches, r=rkruppe
Stabilize the `matches!` macro Fixes rust-lang#65721 FCP: rust-lang#65721 (comment)
2 parents 9eb45e3 + 1c572a2 commit 335c887

File tree

5 files changed

+1
-7
lines changed

5 files changed

+1
-7
lines changed

src/libcore/macros/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,14 @@ macro_rules! debug_assert_ne {
252252
/// # Examples
253253
///
254254
/// ```
255-
/// #![feature(matches_macro)]
256-
///
257255
/// let foo = 'f';
258256
/// assert!(matches!(foo, 'A'..='Z' | 'a'..='z'));
259257
///
260258
/// let bar = Some(4);
261259
/// assert!(matches!(bar, Some(x) if x > 2));
262260
/// ```
263261
#[macro_export]
264-
#[unstable(feature = "matches_macro", issue = "65721")]
262+
#[stable(feature = "matches_macro", since = "1.42.0")]
265263
macro_rules! matches {
266264
($expression:expr, $( $pattern:pat )|+ $( if $guard: expr )?) => {
267265
match $expression {

src/librustc_lint/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#![feature(box_patterns)]
1616
#![feature(box_syntax)]
1717
#![feature(nll)]
18-
#![feature(matches_macro)]
1918
#![recursion_limit = "256"]
2019

2120
#[macro_use]

src/librustc_mir/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
2929
#![feature(range_is_empty)]
3030
#![feature(stmt_expr_attributes)]
3131
#![feature(trait_alias)]
32-
#![feature(matches_macro)]
3332
#![recursion_limit = "256"]
3433

3534
#[macro_use]

src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@
277277
#![feature(linkage)]
278278
#![feature(log_syntax)]
279279
#![feature(manually_drop_take)]
280-
#![feature(matches_macro)]
281280
#![feature(maybe_uninit_ref)]
282281
#![feature(maybe_uninit_slice)]
283282
#![feature(needs_panic_runtime)]

src/libsyntax/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#![feature(const_transmute)]
1212
#![feature(crate_visibility_modifier)]
1313
#![feature(label_break_value)]
14-
#![feature(matches_macro)]
1514
#![feature(nll)]
1615
#![feature(try_trait)]
1716
#![feature(slice_patterns)]

0 commit comments

Comments
 (0)