We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0edd4f9 commit 905b63dCopy full SHA for 905b63d
compiler/rustc_lint/src/builtin.rs
@@ -756,14 +756,14 @@ impl<'tcx> LateLintPass<'tcx> for MissingDebugImplementations {
756
_ => return,
757
}
758
759
- let Some(debug) = cx.tcx.get_diagnostic_item(sym::Debug) else { return };
760
-
761
// Avoid listing trait impls if the trait is allowed.
762
let (level, _) = cx.tcx.lint_level_at_node(MISSING_DEBUG_IMPLEMENTATIONS, item.hir_id());
763
if level == Level::Allow {
764
return;
765
766
+ let Some(debug) = cx.tcx.get_diagnostic_item(sym::Debug) else { return };
+
767
let has_impl = cx
768
.tcx
769
.non_blanket_impls_for_ty(debug, cx.tcx.type_of(item.owner_id).instantiate_identity())
0 commit comments