Rollup merge of #120331 - Nadrieril:no-arena, r=compiler-errors
pattern_analysis: use a plain `Vec` in `DeconstructedPat` The use of an arena-allocated slice in `DeconstructedPat` dates to when we needed the arena anyway for lifetime reasons. Now that we don't, I'm thinking that if `thir::Pat` can use plain old `Vec`s, maybe so can I. r? ```@ghost```
This commit is contained in:
commit
ce32d4862b
7 changed files with 61 additions and 64 deletions
|
@ -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 }
|
||||
}
|
||||
|
||||
|
@ -1575,7 +1575,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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue