diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-05-20 19:54:43 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-20 19:54:43 +0200 |
| commit | 2941434d1b20231a277cc69c84df3e09ad9a0401 (patch) | |
| tree | 46d2e6a9e8a65dce705eb506a55a5f1b635d06b9 /compiler | |
| parent | 7c46bb60d19262af4388a11e274d81b38469c85b (diff) | |
| parent | e7252739cdaf75d52dcdd6fb8abfa7d495e22a09 (diff) | |
| download | rust-2941434d1b20231a277cc69c84df3e09ad9a0401.tar.gz rust-2941434d1b20231a277cc69c84df3e09ad9a0401.zip | |
Rollup merge of #97208 - fmease:fix-issue-97205, r=oli-obk
Do not emit the lint `unused_attributes` for *inherent* `#[doc(hidden)]` associated items Fixes #97205 (embarrassing oversight from #96008). `@rustbot` label A-lint
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index ab3319a1186..3d5da114ecf 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -832,7 +832,7 @@ impl CheckAttrVisitor<'_> { let parent_hir_id = self.tcx.hir().get_parent_item(hir_id); let containing_item = self.tcx.hir().expect_item(parent_hir_id); - if Target::from_item(containing_item) == Target::Impl { + if let hir::ItemKind::Impl(hir::Impl { of_trait: Some(_), .. }) = containing_item.kind { let meta_items = attr.meta_item_list().unwrap(); let (span, replacement_span) = if meta_items.len() == 1 { |
