mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
Add test
This commit is contained in:
@@ -1079,6 +1079,19 @@ macro_rules! foo {
|
||||
.assert_expand_items(r#"foo! { | x | }"#, r#"0"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dollar_crate_lhs_is_not_meta() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($crate) => {};
|
||||
() => {0};
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items(r#"foo!{}"#, r#"0"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lifetime() {
|
||||
parse_macro(
|
||||
|
||||
Reference in New Issue
Block a user