Avoid having to handle an Option
in the type system
This commit is contained in:
parent
4f2b108816
commit
0e7b283573
21 changed files with 146 additions and 109 deletions
|
@ -415,8 +415,8 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> {
|
|||
ty::Pat(ty, pat) => match *pat {
|
||||
ty::PatternKind::Range { start, end, include_end } => {
|
||||
let consts = [
|
||||
start.unwrap_or(self.tcx.consts.unit),
|
||||
end.unwrap_or(self.tcx.consts.unit),
|
||||
start,
|
||||
end,
|
||||
ty::Const::from_bool(
|
||||
self.tcx,
|
||||
matches!(include_end, rustc_hir::RangeEnd::Included),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue