@@ -400,7 +400,7 @@ impl<'p, 'tcx> PatStack<'p, 'tcx> {
400400 }
401401
402402 // 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 > > {
404404 if self . is_empty ( ) {
405405 None
406406 } else if let PatKind :: Or { pats } = & * self . head ( ) . kind {
@@ -1838,7 +1838,7 @@ fn pat_constructor<'tcx>(
18381838 if slice. is_some ( ) { VarLen ( prefix, suffix) } else { FixedLen ( prefix + suffix) } ;
18391839 Some ( Slice ( Slice { array_len, kind } ) )
18401840 }
1841- PatKind :: Or { .. } => bug ! ( ) , // Should have been expanded earlier on.
1841+ PatKind :: Or { .. } => bug ! ( "Or-pattern hould have been expanded earlier on." ) ,
18421842 }
18431843}
18441844
@@ -2444,7 +2444,7 @@ fn specialize_one_pattern<'p, 'a: 'p, 'q: 'p, 'tcx>(
24442444 _ => span_bug ! ( pat. span, "unexpected ctor {:?} for slice pat" , constructor) ,
24452445 } ,
24462446
2447- PatKind :: Or { .. } => bug ! ( ) , // Should have been expanded earlier on.
2447+ PatKind :: Or { .. } => bug ! ( "Or-pattern hould have been expanded earlier on." ) ,
24482448 } ;
24492449 debug ! ( "specialize({:#?}, {:#?}) = {:#?}" , pat, ctor_wild_subpatterns, result) ;
24502450
0 commit comments