Apply suggestions from code review
Co-Authored-By: varkor <github@varkor.com>
This commit is contained in:
parent
0881750173
commit
0f4c5fb20c
2 changed files with 3 additions and 3 deletions
|
@ -1838,7 +1838,7 @@ fn pat_constructor<'tcx>(
|
|||
if slice.is_some() { VarLen(prefix, suffix) } else { FixedLen(prefix + suffix) };
|
||||
Some(Slice(Slice { array_len, kind }))
|
||||
}
|
||||
PatKind::Or { .. } => bug!("Or-pattern hould have been expanded earlier on."),
|
||||
PatKind::Or { .. } => bug!("Or-pattern should have been expanded earlier on."),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2444,7 +2444,7 @@ fn specialize_one_pattern<'p, 'a: 'p, 'q: 'p, 'tcx>(
|
|||
_ => span_bug!(pat.span, "unexpected ctor {:?} for slice pat", constructor),
|
||||
},
|
||||
|
||||
PatKind::Or { .. } => bug!("Or-pattern hould have been expanded earlier on."),
|
||||
PatKind::Or { .. } => bug!("Or-pattern should have been expanded earlier on."),
|
||||
};
|
||||
debug!("specialize({:#?}, {:#?}) = {:#?}", pat, ctor_wild_subpatterns, result);
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ fn main() {
|
|||
}
|
||||
|
||||
match (0u8,) {
|
||||
(1 | 1,) => {} // redundancy not detected for now
|
||||
(1 | 1,) => {} // FIXME(or_patterns): redundancy not detected for now.
|
||||
_ => {}
|
||||
}
|
||||
match (0u8, 0u8) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue