We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
[clippy::dump]
1 parent 8a98609 commit c642cfeCopy full SHA for c642cfe
clippy_lints/src/utils/dump_hir.rs
@@ -1,4 +1,5 @@
1
use clippy_utils::get_attr;
2
+use hir::TraitItem;
3
use rustc_hir as hir;
4
use rustc_lint::{LateContext, LateLintPass, LintContext};
5
use rustc_session::{declare_lint_pass, declare_tool_lint};
@@ -47,6 +48,18 @@ impl<'tcx> LateLintPass<'tcx> for DumpHir {
47
48
println!("{stmt:#?}");
49
}
50
51
+
52
+ fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) {
53
+ if has_attr(cx, item.hir_id()) {
54
+ println!("{item:#?}");
55
+ }
56
57
58
+ fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &hir::ImplItem<'_>) {
59
60
61
62
63
64
65
fn has_attr(cx: &LateContext<'_>, hir_id: hir::HirId) -> bool {
0 commit comments