Actually create ranged int types in the type system.
This commit is contained in:
parent
6b24a9cf70
commit
84acfe86de
97 changed files with 1208 additions and 77 deletions
|
@ -2142,6 +2142,8 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
|||
obligation.predicate.rebind(tys.last().map_or_else(Vec::new, |&last| vec![last])),
|
||||
),
|
||||
|
||||
ty::Pat(ty, _) => Where(obligation.predicate.rebind(vec![*ty])),
|
||||
|
||||
ty::Adt(def, args) => {
|
||||
if let Some(sized_crit) = def.sized_constraint(self.tcx()) {
|
||||
// (*) binder moved here
|
||||
|
@ -2202,6 +2204,11 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
|||
Where(obligation.predicate.rebind(tys.iter().collect()))
|
||||
}
|
||||
|
||||
ty::Pat(ty, _) => {
|
||||
// (*) binder moved here
|
||||
Where(obligation.predicate.rebind(vec![ty]))
|
||||
}
|
||||
|
||||
ty::Coroutine(coroutine_def_id, args) => {
|
||||
match self.tcx().coroutine_movability(coroutine_def_id) {
|
||||
hir::Movability::Static => None,
|
||||
|
@ -2340,7 +2347,7 @@ impl<'tcx> SelectionContext<'_, 'tcx> {
|
|||
|
||||
ty::RawPtr(element_ty, _) | ty::Ref(_, element_ty, _) => t.rebind(vec![element_ty]),
|
||||
|
||||
ty::Array(element_ty, _) | ty::Slice(element_ty) => t.rebind(vec![element_ty]),
|
||||
ty::Pat(ty, _) | ty::Array(ty, _) | ty::Slice(ty) => t.rebind(vec![ty]),
|
||||
|
||||
ty::Tuple(tys) => {
|
||||
// (T1, ..., Tn) -- meets any bound that all of T1...Tn meet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue