Prefer a two value enum over bool
This commit is contained in:
parent
30f168ef81
commit
4f2b108816
9 changed files with 19 additions and 23 deletions
|
@ -2708,11 +2708,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
|||
let start = start.map(|expr| self.lower_const_arg(expr, FeedConstTy::No));
|
||||
let end = end.map(|expr| self.lower_const_arg(expr, FeedConstTy::No));
|
||||
|
||||
let include_end = match include_end {
|
||||
hir::RangeEnd::Included => true,
|
||||
hir::RangeEnd::Excluded => false,
|
||||
};
|
||||
|
||||
let pat = tcx.mk_pat(ty::PatternKind::Range { start, end, include_end });
|
||||
Ty::new_pat(tcx, ty, pat)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue