mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Fix match literal
This commit is contained in:
parent
3894eb77d8
commit
ad9d2012de
2 changed files with 19 additions and 1 deletions
|
@ -575,6 +575,20 @@ fn test_tt_to_stmts() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_literal() {
|
||||
let rules = create_rules(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
('(') => {
|
||||
fn foo() {}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
assert_expansion(MacroKind::Items, &rules, "foo! ['(']", "fn foo () {}");
|
||||
}
|
||||
|
||||
// The following tests are port from intellij-rust directly
|
||||
// https://github.com/intellij-rust/intellij-rust/blob/c4e9feee4ad46e7953b1948c112533360b6087bb/src/test/kotlin/org/rust/lang/core/macros/RsMacroExpansionTest.kt
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue