1
Fork 0

Remove the Option part of range ends in the HIR

This commit is contained in:
Oli Scherer 2025-02-05 15:22:10 +00:00
parent 0e7b283573
commit e8f7a382be
32 changed files with 400 additions and 269 deletions

View file

@ -1943,17 +1943,10 @@ impl<'a> State<'a> {
// Pat isn't normalized, but the beauty of it
// is that it doesn't matter
match pat.kind {
TyPatKind::Range(begin, end, end_kind) => {
if let Some(expr) = begin {
self.print_const_arg(expr);
}
match end_kind {
RangeEnd::Included => self.word("..."),
RangeEnd::Excluded => self.word(".."),
}
if let Some(expr) = end {
self.print_const_arg(expr);
}
TyPatKind::Range(begin, end) => {
self.print_const_arg(begin);
self.word("..=");
self.print_const_arg(end);
}
TyPatKind::Err(_) => {
self.popen();