diff options
| author | bors <bors@rust-lang.org> | 2022-05-20 18:21:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-05-20 18:21:26 +0000 |
| commit | 536020c5f97883aa9f2a90897a5adb520486d2e1 (patch) | |
| tree | ad6c44b81684d98d09459b5117e2ae34a445cb19 /compiler/rustc_passes/src | |
| parent | b5caa5a8421f84cb7664f999b7635801bcf3f96a (diff) | |
| parent | 6c0c7f1787f2ab55e80386ac3d94a63cf32daef2 (diff) | |
| download | rust-536020c5f97883aa9f2a90897a5adb520486d2e1.tar.gz rust-536020c5f97883aa9f2a90897a5adb520486d2e1.zip | |
Auto merge of #97224 - matthiaskrgr:rollup-it5nw68, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #97109 (Fix misleading `cannot infer type for type parameter` error) - #97187 (Reverse condition in Vec::retain_mut doctest) - #97201 (Fix typo) - #97203 (Minor tweaks to rustc book summary formatting.) - #97208 (Do not emit the lint `unused_attributes` for *inherent* `#[doc(hidden)]` associated items) - #97215 (Add complexity estimation of iterating over HashSet and HashMap) - #97220 (Add regression test for#81827) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_passes/src')
| -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 { |
