about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2025-04-21 18:53:20 +0000
committerGitHub <noreply@github.com>2025-04-21 18:53:20 +0000
commit8ecaf148e793c93cdd4b14855eb55e04fd15768a (patch)
treedee0200479fc90dad58d1d6d5fe53cf19b2469c2
parentef167557b6a25659f1a66afc6ce2dd9fd326e750 (diff)
parent2039b36f908b20e7be8a60e903a2a26b21c65ace (diff)
downloadrust-8ecaf148e793c93cdd4b14855eb55e04fd15768a.tar.gz
rust-8ecaf148e793c93cdd4b14855eb55e04fd15768a.zip
Rollup merge of #140111 - jogru0:redundant_pattern, r=compiler-errors
cleanup redundant pattern instances

Just two small code cleanups.
-rw-r--r--compiler/rustc_transmute/src/layout/tree.rs2
-rw-r--r--library/std/src/path.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_transmute/src/layout/tree.rs b/compiler/rustc_transmute/src/layout/tree.rs
index a21be5dda4e..70ecc75403f 100644
--- a/compiler/rustc_transmute/src/layout/tree.rs
+++ b/compiler/rustc_transmute/src/layout/tree.rs
@@ -514,7 +514,7 @@ pub(crate) mod rustc {
                 }
             }
             ty::Tuple(fields) => fields[i.as_usize()],
-            kind @ _ => unimplemented!(
+            kind => unimplemented!(
                 "only a subset of `Ty::ty_and_layout_field`'s functionality is implemented. implementation needed for {:?}",
                 kind
             ),
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index 980213be7ea..50f403ba411 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -3265,7 +3265,7 @@ impl Hash for Path {
                 if !verbatim {
                     component_start += match tail {
                         [b'.'] => 1,
-                        [b'.', sep @ _, ..] if is_sep_byte(*sep) => 1,
+                        [b'.', sep, ..] if is_sep_byte(*sep) => 1,
                         _ => 0,
                     };
                 }