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 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index af502e4106..a1484fa19f 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -4920,3 +4920,34 @@ impl T for () { "#]], ); } + +#[test] +fn hover_ranged_macro_call() { + check_hover_range( + r#" +macro_rules! __rust_force_expr { + ($e:expr) => { + $e + }; +} +macro_rules! vec { + ($elem:expr) => { + __rust_force_expr!($elem) + }; +} + +struct Struct; +impl Struct { + fn foo(self) {} +} + +fn f() { + $0vec![Struct]$0; +} +"#, + expect![[r#" + ```rust + Struct + ```"#]], + ); +} |