diff options
| author | Marcel Müller <neikos@neikos.email> | 2015-06-08 17:58:08 +0200 |
|---|---|---|
| committer | Marcel Müller <neikos@neikos.email> | 2015-06-08 17:58:08 +0200 |
| commit | ebc3de22d8e3b7b1d6e2c77e444965bb9db51aa7 (patch) | |
| tree | 07674a06ffdadd79c4dd87dae81785f49244d8fa | |
| parent | 115121de3d4669a798e99aa69dfdbc7012b4181c (diff) | |
| download | rust-ebc3de22d8e3b7b1d6e2c77e444965bb9db51aa7.tar.gz rust-ebc3de22d8e3b7b1d6e2c77e444965bb9db51aa7.zip | |
Fixed old occurences of the removed array syntax
As per RFC#520 the syntax for arrays has changed, this changes the remaining comments to reflect the new syntax.
| -rw-r--r-- | src/librustc/middle/traits/select.rs | 4 | ||||
| -rw-r--r-- | src/librustc_typeck/check/coercion.rs | 4 | ||||
| -rw-r--r-- | src/librustc_typeck/check/method/README.md | 2 | ||||
| -rw-r--r-- | src/librustc_typeck/check/mod.rs | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/middle/traits/select.rs b/src/librustc/middle/traits/select.rs index 4ea6f0cb26e..789d4f8b9d3 100644 --- a/src/librustc/middle/traits/select.rs +++ b/src/librustc/middle/traits/select.rs @@ -1663,11 +1663,11 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { } 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 92317aae089..624312dac38 100644 --- a/src/librustc_typeck/check/coercion.rs +++ b/src/librustc_typeck/check/coercion.rs @@ -234,8 +234,8 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> { } - // &[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 367273dc635..b5d317d6025 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 e37856bbb2e..6f97239ae93 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); |
