1
Fork 0

Apply suggestions from code review

Co-Authored-By: varkor <github@varkor.com>
This commit is contained in:
Nadrieril Feneanar 2019-11-30 13:35:46 +00:00 committed by GitHub
parent 0881750173
commit 0f4c5fb20c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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) {