Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: varkor <github@varkor.com>
  • Loading branch information
Nadrieril and varkor authored Nov 30, 2019
1 parent 0881750 commit 0f4c5fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/librustc_mir/hair/pattern/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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."),
}
}

Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/or-patterns/exhaustiveness-pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0f4c5fb

Please sign in to comment.