summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src/usefulness.rs
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2024-01-25 03:37:24 +0100
committerNadrieril <nadrieril+git@gmail.com>2024-01-31 19:25:40 +0100
commitbe77cf86bae2b8a9c94eb93092d1b05230b17e8c (patch)
tree4f9da32cbdf9003dbf4ad52b59444d3b565cf8fe /compiler/rustc_pattern_analysis/src/usefulness.rs
parent11f32b73e0dc9287e305b5b9980d24aecdc8c17f (diff)
downloadrust-be77cf86bae2b8a9c94eb93092d1b05230b17e8c.tar.gz
rust-be77cf86bae2b8a9c94eb93092d1b05230b17e8c.zip
Use a `Vec` instead of a slice in `DeconstructedPat`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/usefulness.rs')
-rw-r--r--compiler/rustc_pattern_analysis/src/usefulness.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_pattern_analysis/src/usefulness.rs b/compiler/rustc_pattern_analysis/src/usefulness.rs
index 3d45d032a99..28600d63097 100644
--- a/compiler/rustc_pattern_analysis/src/usefulness.rs
+++ b/compiler/rustc_pattern_analysis/src/usefulness.rs
@@ -848,7 +848,7 @@ impl<'p, Cx: TypeCx> Clone for PatStack<'p, Cx> {
 }
 
 impl<'p, Cx: TypeCx> PatStack<'p, Cx> {
-    fn from_pattern(pat: &'p DeconstructedPat<'p, Cx>) -> Self {
+    fn from_pattern(pat: &'p DeconstructedPat<Cx>) -> Self {
         PatStack { pats: smallvec![PatOrWild::Pat(pat)], relevant: true }
     }
 
@@ -1585,7 +1585,7 @@ pub enum Usefulness<'p, Cx: TypeCx> {
     /// The arm is useful. This additionally carries a set of or-pattern branches that have been
     /// found to be redundant despite the overall arm being useful. Used only in the presence of
     /// or-patterns, otherwise it stays empty.
-    Useful(Vec<&'p DeconstructedPat<'p, Cx>>),
+    Useful(Vec<&'p DeconstructedPat<Cx>>),
     /// The arm is redundant and can be removed without changing the behavior of the match
     /// expression.
     Redundant,