Skip to content

Commit 83d3270

Browse files
committed
resolve: Fix incorrect results of opt_def_kind query for some built-in macros
Previously it always returned `MacroKind::Bang` while some of those macros are actually attributes and derives
1 parent e390e6c commit 83d3270

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/utils/inspector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ fn print_item(cx: &LateContext<'_>, item: &hir::Item<'_>) {
373373
let item_ty = cx.tcx.type_of(did);
374374
println!("function of type {:#?}", item_ty);
375375
},
376-
hir::ItemKind::Macro(ref macro_def) => {
376+
hir::ItemKind::Macro(ref macro_def, _) => {
377377
if macro_def.macro_rules {
378378
println!("macro introduced by `macro_rules!`");
379379
} else {

0 commit comments

Comments
 (0)