]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/deriving/generic/mod.rs
rollup merge of #21830: japaric/for-cleanup
[rust.git] / src / libsyntax / ext / deriving / generic / mod.rs
index 39c67c605112da17060f758ef191754ee372a426..02982039be0a3bf5a9ed8921bb1407d32d91c205 100644 (file)
@@ -770,7 +770,7 @@ fn expand_struct_method_body(&self,
         let mut raw_fields = Vec::new(); // ~[[fields of self],
                                  // [fields of next Self arg], [etc]]
         let mut patterns = Vec::new();
-        for i in 0us..self_args.len() {
+        for i in 0..self_args.len() {
             let struct_path= cx.path(DUMMY_SP, vec!( type_ident ));
             let (pat, ident_expr) =
                 trait_.create_struct_pattern(cx,
@@ -859,8 +859,8 @@ fn expand_static_struct_method_body(&self,
     ///             (&A2(ref __self_0),
     ///              &A2(ref __arg_1_0)) => (*__self_0).eq(&(*__arg_1_0)),
     ///             _ => {
-    ///                 let __self_vi = match *self { A1(..) => 0us, A2(..) => 1us };
-    ///                 let __arg_1_vi = match *__arg_1 { A1(..) => 0us, A2(..) => 1us };
+    ///                 let __self_vi = match *self { A1(..) => 0, A2(..) => 1 };
+    ///                 let __arg_1_vi = match *__arg_1 { A1(..) => 0, A2(..) => 1 };
     ///                 false
     ///             }
     ///         }
@@ -904,8 +904,8 @@ fn expand_enum_method_body(&self,
     ///   (Variant2, Variant2, Variant2) => ... // delegate Matching on Variant2
     ///   ...
     ///   _ => {
-    ///     let __this_vi = match this { Variant1 => 0us, Variant2 => 1us, ... };
-    ///     let __that_vi = match that { Variant1 => 0us, Variant2 => 1us, ... };
+    ///     let __this_vi = match this { Variant1 => 0, Variant2 => 1, ... };
+    ///     let __that_vi = match that { Variant1 => 0, Variant2 => 1, ... };
     ///     ... // catch-all remainder can inspect above variant index values.
     ///   }
     /// }
@@ -1067,13 +1067,13 @@ fn build_enum_match_tuple(
             //
             // ```
             // let __self0_vi = match   self {
-            //     A => 0us, B(..) => 1us, C(..) => 2us
+            //     A => 0, B(..) => 1, C(..) => 2
             // };
             // let __self1_vi = match __arg1 {
-            //     A => 0us, B(..) => 1us, C(..) => 2us
+            //     A => 0, B(..) => 1, C(..) => 2
             // };
             // let __self2_vi = match __arg2 {
-            //     A => 0us, B(..) => 1us, C(..) => 2us
+            //     A => 0, B(..) => 1, C(..) => 2
             // };
             // ```
             let mut index_let_stmts: Vec<P<ast::Stmt>> = Vec::new();