about summary refs log tree commit diff
path: root/clippy_lints/src/utils
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2024-03-21 22:05:29 +0100
committerPhilipp Krones <hello@philkrones.com>2024-03-21 22:05:29 +0100
commit7d42d736c53dce04ec02c2ffdf876d86901de2e7 (patch)
treec98b05e5982d9f5726f9e88d411b5662109108d4 /clippy_lints/src/utils
parent76096efb48d79ee5d3434d31285828d15a50b9c7 (diff)
parent443f459f98841001b2c2041adda05b9318f44b24 (diff)
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/utils')
-rw-r--r--clippy_lints/src/utils/internal_lints/metadata_collector.rs2
-rw-r--r--clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/utils/internal_lints/metadata_collector.rs b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
index 97b509a84f9..1ebe1d6a2c4 100644
--- a/clippy_lints/src/utils/internal_lints/metadata_collector.rs
+++ b/clippy_lints/src/utils/internal_lints/metadata_collector.rs
@@ -925,7 +925,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for LintResolver<'a, 'hir> {
             && let (expr_ty, _) = walk_ptrs_ty_depth(self.cx.typeck_results().expr_ty(expr))
             && match_type(self.cx, expr_ty, &paths::LINT)
         {
-            if let hir::def::Res::Def(DefKind::Static(..), _) = path.res {
+            if let hir::def::Res::Def(DefKind::Static { .. }, _) = path.res {
                 let lint_name = last_path_segment(qpath).ident.name;
                 self.lints.push(sym_to_string(lint_name).to_ascii_lowercase());
             } else if let Some(local) = get_parent_local(self.cx, expr) {
diff --git a/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs b/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs
index 38c832931fc..f4e277fd0c4 100644
--- a/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs
+++ b/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs
@@ -223,7 +223,7 @@ fn path_to_matched_type(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> Option<Ve
                     None
                 }
             },
-            Res::Def(DefKind::Static(_), def_id) => read_mir_alloc_def_path(
+            Res::Def(DefKind::Static { .. }, def_id) => read_mir_alloc_def_path(
                 cx,
                 cx.tcx.eval_static_initializer(def_id).ok()?.inner(),
                 cx.tcx.type_of(def_id).instantiate_identity(),