}
ty::ty_vec(element_ty, ref len) => {
- // [T, ..n] and [T]
+ // [T; n] and [T]
match bound {
ty::BoundCopy => {
match *len {
- // [T, ..n] is copy iff T is copy
+ // [T; n] is copy iff T is copy
Some(_) => ok_if(vec![element_ty]),
// [T] is unsized and hence affine
}
- // &[T, ..n] or &mut [T, ..n] -> &[T]
- // or &mut [T, ..n] -> &mut [T]
+ // &[T; n] or &mut [T; n] -> &[T]
+ // or &mut [T; n] -> &mut [T]
// or &Concrete -> &Trait, etc.
fn coerce_unsized(&self,
source: Ty<'tcx>,
Here `ADJ` is some kind of adjustment, which is typically a series of
autoderefs and then possibly an autoref (e.g., `&**receiver`). However
we sometimes do other adjustments and coercions along the way, in
-particular unsizing (e.g., converting from `[T, ..n]` to `[T]`).
+particular unsizing (e.g., converting from `[T; n]` to `[T]`).
## The Two Phases
return final_mt;
}
- // After we have fully autoderef'd, if the resulting type is [T, ..n], then
+ // After we have fully autoderef'd, if the resulting type is [T; n], then
// do a final unsized coercion to yield [T].
if let ty::ty_vec(element_ty, Some(_)) = ty.sty {
let adjusted_ty = ty::mk_vec(fcx.tcx(), element_ty, None);