mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add test
This commit is contained in:
parent
74a24adc8e
commit
bced02c5dc
1 changed files with 13 additions and 0 deletions
|
@ -1079,6 +1079,19 @@ fn test_vertical_bar_with_pat() {
|
||||||
.assert_expand_items(r#"foo! { | x | }"#, r#"0"#);
|
.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]
|
#[test]
|
||||||
fn test_lifetime() {
|
fn test_lifetime() {
|
||||||
parse_macro(
|
parse_macro(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue