Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
| -rw-r--r-- | crates/ide/src/hover/tests.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index e60be577f7..81397b0785 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -8988,3 +8988,33 @@ mod m { "#]], ); } + +#[test] +fn regression_18238() { + check( + r#" +macro_rules! foo { + ($name:ident) => { + pub static $name = Foo::new(|| { + $crate; + }); + }; +} + +foo!(BAR_$0); +"#, + expect![[r#" + *BAR_* + + ```rust + test + ``` + + ```rust + pub static BAR_: {error} = Foo::new(||{ + crate; + }) + ``` + "#]], + ); +} |