@@ -400,7 +400,7 @@ impl<'p, 'tcx> PatStack<'p, 'tcx> {
400
400
}
401
401
402
402
// If the first pattern is an or-pattern, expand this pattern. Otherwise, return `None`.
403
- fn expand_or_pat ( & self ) -> Option < Vec < PatStack < ' p , ' tcx > > > {
403
+ fn expand_or_pat ( & self ) -> Option < Vec < Self > > {
404
404
if self . is_empty ( ) {
405
405
None
406
406
} else if let PatKind :: Or { pats } = & * self . head ( ) . kind {
@@ -1838,7 +1838,7 @@ fn pat_constructor<'tcx>(
1838
1838
if slice. is_some ( ) { VarLen ( prefix, suffix) } else { FixedLen ( prefix + suffix) } ;
1839
1839
Some ( Slice ( Slice { array_len, kind } ) )
1840
1840
}
1841
- PatKind :: Or { .. } => bug ! ( ) , // Should have been expanded earlier on.
1841
+ PatKind :: Or { .. } => bug ! ( "Or-pattern hould have been expanded earlier on." ) ,
1842
1842
}
1843
1843
}
1844
1844
@@ -2444,7 +2444,7 @@ fn specialize_one_pattern<'p, 'a: 'p, 'q: 'p, 'tcx>(
2444
2444
_ => span_bug ! ( pat. span, "unexpected ctor {:?} for slice pat" , constructor) ,
2445
2445
} ,
2446
2446
2447
- PatKind :: Or { .. } => bug ! ( ) , // Should have been expanded earlier on.
2447
+ PatKind :: Or { .. } => bug ! ( "Or-pattern hould have been expanded earlier on." ) ,
2448
2448
} ;
2449
2449
debug ! ( "specialize({:#?}, {:#?}) = {:#?}" , pat, ctor_wild_subpatterns, result) ;
2450
2450
0 commit comments