Skip to content

Commit 6e6bdc3

Browse files
committed
don't emit implicit drop inlay hints for macro
1 parent 8151886 commit 6e6bdc3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ pub(super) fn hints(
5454
};
5555
let range = match terminator.span {
5656
MirSpan::ExprId(e) => match source_map.expr_syntax(e) {
57-
Ok(s) => {
57+
// don't show inlay hint for macro
58+
Ok(s) if !s.file_id.is_macro() => {
5859
let root = &s.file_syntax(sema.db);
5960
let expr = s.value.to_node(root);
6061
let expr = expr.syntax();
@@ -69,7 +70,7 @@ pub(super) fn hints(
6970
}
7071
}
7172
}
72-
Err(_) => continue,
73+
_ => continue,
7374
},
7475
MirSpan::PatId(p) => match source_map.pat_syntax(p) {
7576
Ok(s) => s.value.text_range(),

0 commit comments

Comments
 (0)