1
Fork 0

Avoid having to handle an Option in the type system

This commit is contained in:
Oli Scherer 2025-02-05 15:22:10 +00:00
parent 4f2b108816
commit 0e7b283573
21 changed files with 146 additions and 109 deletions

View file

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