diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 4ea6f0cb26ea0b5d182e09ba4088666737a87403..789d4f8b9d31096c5f457decce6925afac512eb4 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -1663,11 +1663,11 @@ fn builtin_bound(&mut self, } 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 diff --git a/src/librustc_typeck/check/coercion.rs b/src/librustc_typeck/check/coercion.rs index 92317aae08967d18510f21a471476bd38547a888..624312dac38736c96d54b15997cff9a2d0186dee 100644 --- a/src/librustc_typeck/check/coercion.rs +++ b/src/librustc_typeck/check/coercion.rs @@ -234,8 +234,8 @@ fn coerce_borrowed_pointer(&self, } - // &[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>, diff --git a/src/librustc_typeck/check/method/README.md b/src/librustc_typeck/check/method/README.md index 367273dc635f47b003fed53abf9a7f001f5bb595..b5d317d602538f2cf83cfed10e18680e35c417c1 100644 --- a/src/librustc_typeck/check/method/README.md +++ b/src/librustc_typeck/check/method/README.md @@ -18,7 +18,7 @@ into a more explicit UFCS form: 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 diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index e37856bbb2ea2c6dcc89b855e578df222b1886cd..6f97239ae939eb188b69328d5ddd05e91c87f990 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -2085,7 +2085,7 @@ fn lookup_indexing<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>, 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);