Actually create ranged int types in the type system.
This commit is contained in:
@@ -42,8 +42,8 @@ pub fn trivial_dropck_outlives<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
|
||||
| ty::Foreign(..)
|
||||
| ty::Error(_) => true,
|
||||
|
||||
// [T; N] and [T] have same properties as T.
|
||||
ty::Array(ty, _) | ty::Slice(ty) => trivial_dropck_outlives(tcx, *ty),
|
||||
// `T is PAT`, `[T; N]`, and `[T]` have same properties as T.
|
||||
ty::Pat(ty, _) | ty::Array(ty, _) | ty::Slice(ty) => trivial_dropck_outlives(tcx, *ty),
|
||||
|
||||
// (T1..Tn) and closures have same properties as T1..Tn --
|
||||
// check if *all* of them are trivial.
|
||||
@@ -222,7 +222,7 @@ pub fn dtorck_constraint_for_ty_inner<'tcx>(
|
||||
// these types never have a destructor
|
||||
}
|
||||
|
||||
ty::Array(ety, _) | ty::Slice(ety) => {
|
||||
ty::Pat(ety, _) | ty::Array(ety, _) | ty::Slice(ety) => {
|
||||
// single-element containers, behave like their element
|
||||
rustc_data_structures::stack::ensure_sufficient_stack(|| {
|
||||
dtorck_constraint_for_ty_inner(tcx, param_env, span, depth + 1, *ety, constraints)
|
||||
|
||||
Reference in New Issue
Block a user