Skip to content

Commit

Permalink
Add test for implicit format args support through nested macro call
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Dec 5, 2023
1 parent ba47b36 commit 813e0ac
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions crates/ide/src/hover/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6673,3 +6673,28 @@ format_args!(r"{$0aaaaa}");
"#]],
);
}

#[test]
fn format_args_implicit_nested() {
check(
r#"
//- minicore: fmt
macro_rules! foo {
($($tt:tt)*) => {
format_args!($($tt)*)
}
}
fn test() {
let aaaaa = "foo";
foo!(r"{$0aaaaa}");
}
"#,
expect![[r#"
*aaaaa*
```rust
let aaaaa: &str // size = 16 (0x10), align = 8, niches = 1
```
"#]],
);
}

0 comments on commit 813e0ac

Please sign in to comment.