diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-09 05:42:28 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-06-09 05:42:28 +0530 |
| commit | 4b5ac524f3e9430708531a18f7bfbca54c6deb28 (patch) | |
| tree | d31798d36855eded6cdaabc9474f4e6446e25e6f | |
| parent | c95da07eb080278071079d9f75f45e2042b12f0b (diff) | |
| parent | ebc3de22d8e3b7b1d6e2c77e444965bb9db51aa7 (diff) | |
| download | rust-4b5ac524f3e9430708531a18f7bfbca54c6deb28.tar.gz rust-4b5ac524f3e9430708531a18f7bfbca54c6deb28.zip | |
Rollup merge of #26099 - TheNeikos:fix-old_array_syntax_in_comments, r=alexcrichton
As per RFC#520 the syntax for arrays has changed, this changes the remaining comments to reflect the new syntax. I checked for existing occurences of this with the following command: `ag "\[., \.\..\]"` which by now should only return a single occurence.
| -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); |
