mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-16 17:03:35 +00:00
Fix expansion of or-patterns
This commit is contained in:
parent
5df6f72057
commit
834f043a08
@ -1411,6 +1411,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if expand_until != 0 {
|
||||
expand_until = i + 1;
|
||||
}
|
||||
}
|
||||
let (candidates_to_expand, remaining_candidates) = candidates.split_at_mut(expand_until);
|
||||
|
||||
|
@ -4,12 +4,11 @@ fn match_enum(_1: E1) -> bool {
|
||||
debug x => _1;
|
||||
let mut _0: bool;
|
||||
let mut _2: isize;
|
||||
let mut _3: isize;
|
||||
|
||||
bb0: {
|
||||
PlaceMention(_1);
|
||||
_2 = discriminant(_1);
|
||||
switchInt(move _2) -> [0: bb3, 1: bb5, otherwise: bb2];
|
||||
switchInt(move _2) -> [0: bb3, 1: bb5, 2: bb7, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
@ -18,12 +17,11 @@ fn match_enum(_1: E1) -> bool {
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_3 = discriminant(_1);
|
||||
switchInt(move _3) -> [2: bb8, otherwise: bb1];
|
||||
goto -> bb1;
|
||||
}
|
||||
|
||||
bb3: {
|
||||
goto -> bb7;
|
||||
goto -> bb9;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
@ -31,7 +29,7 @@ fn match_enum(_1: E1) -> bool {
|
||||
}
|
||||
|
||||
bb5: {
|
||||
goto -> bb7;
|
||||
goto -> bb9;
|
||||
}
|
||||
|
||||
bb6: {
|
||||
@ -39,16 +37,16 @@ fn match_enum(_1: E1) -> bool {
|
||||
}
|
||||
|
||||
bb7: {
|
||||
falseEdge -> [real: bb10, imaginary: bb2];
|
||||
}
|
||||
|
||||
bb8: {
|
||||
_0 = const false;
|
||||
goto -> bb11;
|
||||
}
|
||||
|
||||
bb8: {
|
||||
goto -> bb2;
|
||||
}
|
||||
|
||||
bb9: {
|
||||
goto -> bb1;
|
||||
falseEdge -> [real: bb10, imaginary: bb7];
|
||||
}
|
||||
|
||||
bb10: {
|
||||
|
Loading…
Reference in New Issue
Block a user