Skip to content

Commit 4036a7a

Browse files
committed
add test case for ignoring inlay hint for macro call
1 parent 6e6bdc3 commit 4036a7a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/tools/rust-analyzer/crates/ide/src/inlay_hints/implicit_drop.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,27 @@ mod tests {
229229
//^ drop(y)
230230
}
231231
//^ drop(x)
232+
"#,
233+
);
234+
}
235+
236+
#[test]
237+
fn ignore_inlay_hint_for_macro_call() {
238+
check_with_config(
239+
ONLY_DROP_CONFIG,
240+
r#"
241+
struct X;
242+
243+
macro_rules! my_macro {
244+
() => {{
245+
let bbb = X;
246+
bbb
247+
}};
248+
}
249+
250+
fn test() -> X {
251+
my_macro!()
252+
}
232253
"#,
233254
);
234255
}

0 commit comments

Comments
 (0)