diff options
| author | mark <markm@cs.wisc.edu> | 2021-03-22 13:53:16 -0500 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2021-04-15 13:52:09 -0500 |
| commit | ebc4acee91dc9871d1c90f0d7a38aff0580dd18a (patch) | |
| tree | 4dbf786f7459fca087a6834714b0fe2c406c36d2 /compiler/rustc_expand | |
| parent | 2962e7c0089d5c136f4e9600b7abccfbbde4973d (diff) | |
| download | rust-ebc4acee91dc9871d1c90f0d7a38aff0580dd18a.tar.gz rust-ebc4acee91dc9871d1c90f0d7a38aff0580dd18a.zip | |
stabilize :pat2015, leave :pat2021 gated
Diffstat (limited to 'compiler/rustc_expand')
| -rw-r--r-- | compiler/rustc_expand/src/mbe/quoted.rs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/compiler/rustc_expand/src/mbe/quoted.rs b/compiler/rustc_expand/src/mbe/quoted.rs index e205cb65d02..c3e7448b630 100644 --- a/compiler/rustc_expand/src/mbe/quoted.rs +++ b/compiler/rustc_expand/src/mbe/quoted.rs @@ -62,19 +62,16 @@ pub(super) fn parse( Some((frag, _)) => { let span = token.span.with_lo(start_sp.lo()); - match frag.name { - sym::pat2015 | sym::pat2021 => { - if !features.edition_macro_pats { - feature_err( - sess, - sym::edition_macro_pats, - frag.span, - "`pat2015` and `pat2021` are unstable.", - ) - .emit(); - } - } - _ => {} + if matches!(frag.name, sym::pat2021) + && !features.edition_macro_pats + { + feature_err( + sess, + sym::edition_macro_pats, + frag.span, + "`pat2021` is unstable.", + ) + .emit(); } let kind = |
