]> git.lizzy.rs Git - rust.git/commitdiff
Fixed old occurences of the removed array syntax
authorMarcel Müller <neikos@neikos.email>
Mon, 8 Jun 2015 15:58:08 +0000 (17:58 +0200)
committerMarcel Müller <neikos@neikos.email>
Mon, 8 Jun 2015 15:58:08 +0000 (17:58 +0200)
As per RFC#520 the syntax for arrays has changed,
this changes the remaining comments to reflect
the new syntax.

src/librustc/middle/traits/select.rs
src/librustc_typeck/check/coercion.rs
src/librustc_typeck/check/method/README.md
src/librustc_typeck/check/mod.rs

index 4ea6f0cb26ea0b5d182e09ba4088666737a87403..789d4f8b9d31096c5f457decce6925afac512eb4 100644 (file)
@@ -1663,11 +1663,11 @@ fn builtin_bound(&mut self,
             }
 
             ty::ty_vec(element_ty, ref len) => {
-                // [T, ..n] and [T]
+                // [Tn] and [T]
                 match bound {
                     ty::BoundCopy => {
                         match *len {
-                            // [T, ..n] is copy iff T is copy
+                            // [Tn] is copy iff T is copy
                             Some(_) => ok_if(vec![element_ty]),
 
                             // [T] is unsized and hence affine
index 92317aae08967d18510f21a471476bd38547a888..624312dac38736c96d54b15997cff9a2d0186dee 100644 (file)
@@ -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 [Tn] -> &mut [T]
     // or &Concrete -> &Trait, etc.
     fn coerce_unsized(&self,
                       source: Ty<'tcx>,
index 367273dc635f47b003fed53abf9a7f001f5bb595..b5d317d602538f2cf83cfed10e18680e35c417c1 100644 (file)
@@ -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 `[Tn]` to `[T]`).
 
 ## The Two Phases
 
index e37856bbb2ea2c6dcc89b855e578df222b1886cd..6f97239ae939eb188b69328d5ddd05e91c87f990 100644 (file)
@@ -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 [Tn], 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);