mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Use pattern_single instead of pattern in mbe pat
This commit is contained in:
parent
f3125555a8
commit
f942d10e80
3 changed files with 14 additions and 2 deletions
|
@ -1003,6 +1003,18 @@ fn test_underscore() {
|
|||
.assert_expand_items(r#"foo! { => }"#, r#"0"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_vertical_bar_with_pat() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
(| $pat:pat | ) => { 0 }
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items(r#"foo! { | x | }"#, r#"0"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lifetime() {
|
||||
parse_macro(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue