-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! test: cross-edition metavar fragment specifiers
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
- Loading branch information
1 parent
81b3c9f
commit e07b011
Showing
2 changed files
with
9 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
//@ edition: 2021 | ||
|
||
#![feature(macro_metavar_expr)] | ||
|
||
#[macro_export] | ||
macro_rules! make_matcher { | ||
($name:ident, $fragment_type:ident) => { | ||
($name:ident, $fragment_type:ident, $d:tt) => { | ||
#[macro_export] | ||
macro_rules! $name { | ||
($$_:$fragment_type) => { true }; | ||
($$($$_:tt)*) => { false }; | ||
($d _:$fragment_type) => { true }; | ||
(const { 0 }) => { false }; | ||
} | ||
} | ||
}; | ||
} | ||
|
||
make_matcher!(is_expr_from_2021, expr); | ||
make_matcher!(is_expr_from_2021, expr, $); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters