mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
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
This commit is contained in:
parent
e390e6c469
commit
83d32701f2
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue