Unnamed repository; edit this file 'description' to name the repository.
Add test for implicit format args support through nested macro call
| -rw-r--r-- | crates/ide/src/hover/tests.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index 53585624b6..8c9d58671e 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -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 + ``` + "#]], + ); +} |