about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--clippy_lints/src/matches/match_same_arms.rs3
-rw-r--r--clippy_lints/src/redundant_type_annotations.rs2
-rw-r--r--clippy_lints/src/utils/author.rs2
-rw-r--r--clippy_utils/src/consts.rs2
4 files changed, 5 insertions, 4 deletions
diff --git a/clippy_lints/src/matches/match_same_arms.rs b/clippy_lints/src/matches/match_same_arms.rs
index 6595658b769..b8f7d966820 100644
--- a/clippy_lints/src/matches/match_same_arms.rs
+++ b/clippy_lints/src/matches/match_same_arms.rs
@@ -295,7 +295,8 @@ impl<'a> NormalizedPat<'a> {
                     LitKind::Char(val) => Self::LitInt(val.into()),
                     LitKind::Int(val, _) => Self::LitInt(val.get()),
                     LitKind::Bool(val) => Self::LitBool(val),
-                    LitKind::Float(..) | LitKind::Err => Self::Wild,
+                    LitKind::Float(..) => Self::Wild,
+                    LitKind::Err(guar) => Self::Err(guar),
                 },
                 _ => Self::Wild,
             },
diff --git a/clippy_lints/src/redundant_type_annotations.rs b/clippy_lints/src/redundant_type_annotations.rs
index c8352c05265..079e6500e3c 100644
--- a/clippy_lints/src/redundant_type_annotations.rs
+++ b/clippy_lints/src/redundant_type_annotations.rs
@@ -200,7 +200,7 @@ impl LateLintPass<'_> for RedundantTypeAnnotations {
                                 span_lint(cx, REDUNDANT_TYPE_ANNOTATIONS, local.span, "redundant type annotation");
                             }
                         },
-                        LitKind::Err => (),
+                        LitKind::Err(_) => (),
                         LitKind::ByteStr(..) => {
                             // We only lint if the type annotation is an array type (e.g. &[u8; 4]).
                             // If instead it is a slice (e.g. &[u8]) it may not be redundant, so we
diff --git a/clippy_lints/src/utils/author.rs b/clippy_lints/src/utils/author.rs
index 29c67341a46..a0a6382046d 100644
--- a/clippy_lints/src/utils/author.rs
+++ b/clippy_lints/src/utils/author.rs
@@ -279,7 +279,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
         match lit.value.node {
             LitKind::Bool(val) => kind!("Bool({val:?})"),
             LitKind::Char(c) => kind!("Char({c:?})"),
-            LitKind::Err => kind!("Err"),
+            LitKind::Err(_) => kind!("Err"),
             LitKind::Byte(b) => kind!("Byte({b})"),
             LitKind::Int(i, suffix) => {
                 let int_ty = match suffix {
diff --git a/clippy_utils/src/consts.rs b/clippy_utils/src/consts.rs
index 61b38391d9e..79c691992a8 100644
--- a/clippy_utils/src/consts.rs
+++ b/clippy_utils/src/consts.rs
@@ -286,7 +286,7 @@ pub fn lit_to_mir_constant<'tcx>(lit: &LitKind, ty: Option<Ty<'tcx>>) -> Constan
             _ => bug!(),
         },
         LitKind::Bool(b) => Constant::Bool(b),
-        LitKind::Err => Constant::Err,
+        LitKind::Err(_) => Constant::Err,
     }
 }