diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2025-07-24 09:32:58 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2025-08-11 17:05:42 -0500 |
| commit | bf266dc8341755f0f7ac6de1cfa474875f79b3d9 (patch) | |
| tree | 2fa05402418496736771768baa7dfa8fa86e396a /compiler/rustc_lint/src/internal.rs | |
| parent | 5bc23ce25548d7f4a9f6ceaa48cc3d8fe7629f58 (diff) | |
| download | rust-bf266dc8341755f0f7ac6de1cfa474875f79b3d9.tar.gz rust-bf266dc8341755f0f7ac6de1cfa474875f79b3d9.zip | |
Propagate TraitImplHeader to hir
Diffstat (limited to 'compiler/rustc_lint/src/internal.rs')
| -rw-r--r-- | compiler/rustc_lint/src/internal.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index 9f02f1f0df3..016ff17f5d7 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -582,8 +582,8 @@ impl Diagnostics { for (_hir_id, parent) in cx.tcx.hir_parent_iter(current_id) { debug!(?parent); if let hir::Node::Item(hir::Item { kind: hir::ItemKind::Impl(impl_), .. }) = parent - && let hir::Impl { of_trait: Some(of_trait), .. } = impl_ - && let Some(def_id) = of_trait.trait_def_id() + && let Some(of_trait) = impl_.of_trait + && let Some(def_id) = of_trait.trait_ref.trait_def_id() && let Some(name) = cx.tcx.get_diagnostic_name(def_id) && matches!(name, sym::Diagnostic | sym::Subdiagnostic | sym::LintDiagnostic) { |
