mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Fix macro expansion for statements w/o semicolon
This commit is contained in:
parent
c0a2b4e826
commit
8e07b23b84
10 changed files with 99 additions and 61 deletions
|
@ -215,6 +215,22 @@ fn expr_macro_expanded_in_various_places() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn expr_macro_expanded_in_stmts() {
|
||||
check_infer(
|
||||
r#"
|
||||
macro_rules! id { ($($es:tt)*) => { $($es)* } }
|
||||
fn foo() {
|
||||
id! { let a = (); }
|
||||
}
|
||||
"#,
|
||||
expect![[r#"
|
||||
!0..8 'leta=();': ()
|
||||
57..84 '{ ...); } }': ()
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_type_value_macro_having_same_name() {
|
||||
check_infer(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue