Skip to content

Commit 5d585ec

Browse files
committed
Auto merge of rust-lang#79318 - cjgillot:fitem, r=lcnr
Store HIR ForeignItem in a side table In a similar fashion to Item, ImplItem and TraitItem.
2 parents f303168 + d95f11b commit 5d585ec

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

clippy_lints/src/missing_doc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingDoc {
147147
hir::ItemKind::Union(..) => "a union",
148148
hir::ItemKind::OpaqueTy(..) => "an existential type",
149149
hir::ItemKind::ExternCrate(..)
150-
| hir::ItemKind::ForeignMod(..)
150+
| hir::ItemKind::ForeignMod { .. }
151151
| hir::ItemKind::GlobalAsm(..)
152152
| hir::ItemKind::Impl { .. }
153153
| hir::ItemKind::Use(..) => return,

clippy_lints/src/missing_inline.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
125125
| hir::ItemKind::Union(..)
126126
| hir::ItemKind::OpaqueTy(..)
127127
| hir::ItemKind::ExternCrate(..)
128-
| hir::ItemKind::ForeignMod(..)
128+
| hir::ItemKind::ForeignMod { .. }
129129
| hir::ItemKind::Impl { .. }
130130
| hir::ItemKind::Use(..) => {},
131131
};

clippy_lints/src/utils/inspector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ fn print_item(cx: &LateContext<'_>, item: &hir::Item<'_>) {
395395
println!("function of type {:#?}", item_ty);
396396
},
397397
hir::ItemKind::Mod(..) => println!("module"),
398-
hir::ItemKind::ForeignMod(ref fm) => println!("foreign module with abi: {}", fm.abi),
398+
hir::ItemKind::ForeignMod { abi, .. } => println!("foreign module with abi: {}", abi),
399399
hir::ItemKind::GlobalAsm(ref asm) => println!("global asm: {:?}", asm),
400400
hir::ItemKind::TyAlias(..) => {
401401
println!("type alias for {:?}", cx.tcx.type_of(did));

0 commit comments

Comments
 (0)