about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/thir
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-27 23:48:47 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2023-09-27 23:49:15 +0200
commitfd95627134e85f56f2e162790f56943b407f1a34 (patch)
treef33caf668ee173d40148682358f2c0a89807f13c /compiler/rustc_mir_build/src/thir
parentd4589a492f5419220c73d216dd538feb30b9b0c5 (diff)
downloadrust-fd95627134e85f56f2e162790f56943b407f1a34.tar.gz
rust-fd95627134e85f56f2e162790f56943b407f1a34.zip
fix clippy::{redundant_guards, useless_format}
Diffstat (limited to 'compiler/rustc_mir_build/src/thir')
-rw-r--r--compiler/rustc_mir_build/src/thir/pattern/check_match.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
index 95dced644e1..d440ca31926 100644
--- a/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
+++ b/compiler/rustc_mir_build/src/thir/pattern/check_match.rs
@@ -740,9 +740,7 @@ fn non_exhaustive_match<'p, 'tcx>(
                         ));
                 }
             } else if ty == cx.tcx.types.str_ {
-                err.note(format!(
-                    "`&str` cannot be matched exhaustively, so a wildcard `_` is necessary",
-                ));
+                err.note("`&str` cannot be matched exhaustively, so a wildcard `_` is necessary");
             } else if cx.is_foreign_non_exhaustive_enum(ty) {
                 err.note(format!("`{ty}` is marked as non-exhaustive, so a wildcard `_` is necessary to match exhaustively"));
             }