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
|
@ -249,6 +249,20 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
|
|||
self.add_constraints_from_ty(current, typ, variance);
|
||||
}
|
||||
|
||||
ty::Pat(typ, pat) => {
|
||||
match *pat {
|
||||
ty::PatternKind::Range { start, end, include_end: _ } => {
|
||||
if let Some(start) = start {
|
||||
self.add_constraints_from_const(current, start, variance);
|
||||
}
|
||||
if let Some(end) = end {
|
||||
self.add_constraints_from_const(current, end, variance);
|
||||
}
|
||||
}
|
||||
}
|
||||
self.add_constraints_from_ty(current, typ, variance);
|
||||
}
|
||||
|
||||
ty::Slice(typ) => {
|
||||
self.add_constraints_from_ty(current, typ, variance);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue