]> git.lizzy.rs Git - rust.git/commitdiff
RIMOV, round 6.
authorBen Striegel <ben.striegel@gmail.com>
Wed, 30 Jan 2013 02:43:49 +0000 (21:43 -0500)
committerBen Striegel <ben.striegel@gmail.com>
Thu, 31 Jan 2013 04:18:08 +0000 (23:18 -0500)
This gets rid of `mut` inside bare vectors. It's going to cause some
problems later.

src/libcore/hash.rs
src/librustc/middle/typeck/infer/region_inference.rs
src/libsyntax/parse/parser.rs

index d3d6c5ae2424ba760d82f6a871359e19c19e9c8d..688cd32a1e0ce4b18f75748a671e7a155e4ca77f 100644 (file)
@@ -169,7 +169,7 @@ struct SipState {
     mut v1: u64,
     mut v2: u64,
     mut v3: u64,
-    tail: [mut u8 * 8], // unprocessed bytes
+    mut tail: [u8 * 8], // unprocessed bytes
     mut ntail: uint,  // how many bytes in tail are valid
 }
 
@@ -183,7 +183,7 @@ fn SipState(key0: u64, key1: u64) -> SipState {
         mut v1 : 0u64,
         mut v2 : 0u64,
         mut v3 : 0u64,
-        tail : [mut 0u8,0,0,0,0,0,0,0],
+        mut tail : [0u8,0,0,0,0,0,0,0],
         mut ntail : 0u,
     };
     (&state).reset();
index e4041e8f9e0b43c511a6fd003e06d97ada25ca95..d928ad264fdd298718d96753fb6915187b631c61 100644 (file)
@@ -1237,7 +1237,7 @@ fn construct_graph(&self) -> Graph {
                 classification: Contracting,
                 span: self.var_spans[var_idx],
                 value: NoValue,
-                head_edge: [mut uint::max_value, uint::max_value]
+                head_edge: [uint::max_value, uint::max_value]
             }
         });
 
@@ -1245,7 +1245,7 @@ fn construct_graph(&self) -> Graph {
         let mut edges = vec::with_capacity(num_edges);
         for self.constraints.each_ref |constraint, span| {
             edges.push(GraphEdge {
-                next_edge: [mut uint::max_value, uint::max_value],
+                next_edge: [uint::max_value, uint::max_value],
                 constraint: *constraint,
                 span: *span
             });
index d41fedebde3a15bc33dfe5b5f5a25f8447d5e721..5e5537aedeaccb004199401dee72f2da8498cbd5 100644 (file)
@@ -193,7 +193,7 @@ pub fn Parser(sess: parse_sess,
         token: tok0.tok,
         span: span0,
         last_span: span0,
-        buffer: [mut {tok: tok0.tok, sp: span0}, ..4],
+        mut buffer: [{tok: tok0.tok, sp: span0}, ..4],
         buffer_start: 0,
         buffer_end: 0,
         tokens_consumed: 0u,
@@ -213,7 +213,7 @@ pub struct Parser {
     mut token: token::Token,
     mut span: span,
     mut last_span: span,
-    mut buffer: [mut {tok: token::Token, sp: span} * 4],
+    mut buffer: [{tok: token::Token, sp: span} * 4],
     mut buffer_start: int,
     mut buffer_end: int,
     mut tokens_consumed: uint,