]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/exhaustive_items.rs
Auto merge of #85690 - bstrie:m2_arena, r=jackh726,nagisa
[rust.git] / src / tools / clippy / clippy_lints / src / exhaustive_items.rs
index e00126046c0223fcaf5142e92f554caa572267dd..bb4684ce38b3d7eba4b74988aa8fe5cad9ddf05f 100644 (file)
@@ -71,7 +71,7 @@ impl LateLintPass<'_> for ExhaustiveItems {
     fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
         if_chain! {
             if let ItemKind::Enum(..) | ItemKind::Struct(..) = item.kind;
-            if cx.access_levels.is_exported(item.hir_id());
+            if cx.access_levels.is_exported(item.def_id);
             let attrs = cx.tcx.hir().attrs(item.hir_id());
             if !attrs.iter().any(|a| a.has_name(sym::non_exhaustive));
             then {