Skip to content

Commit

Permalink
resolve: Fix incorrect results of opt_def_kind query for some built…
Browse files Browse the repository at this point in the history
…-in macros

Previously it always returned `MacroKind::Bang` while some of those macros are actually attributes and derives
  • Loading branch information
petrochenkov committed Feb 24, 2022
1 parent e390e6c commit 83d3270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/utils/inspector.rs
Expand Up @@ -373,7 +373,7 @@ fn print_item(cx: &LateContext<'_>, item: &hir::Item<'_>) {
let item_ty = cx.tcx.type_of(did);
println!("function of type {:#?}", item_ty);
},
hir::ItemKind::Macro(ref macro_def) => {
hir::ItemKind::Macro(ref macro_def, _) => {
if macro_def.macro_rules {
println!("macro introduced by `macro_rules!`");
} else {
Expand Down

0 comments on commit 83d3270

Please sign in to comment.