Skip to content

Commit 1c9b5a8

Browse files
committed
RIMOV, round 6.
This gets rid of `mut` inside bare vectors. It's going to cause some problems later.
1 parent 610fd6b commit 1c9b5a8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/libcore/hash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ struct SipState {
169169
mut v1: u64,
170170
mut v2: u64,
171171
mut v3: u64,
172-
tail: [mut u8 * 8], // unprocessed bytes
172+
mut tail: [u8 * 8], // unprocessed bytes
173173
mut ntail: uint, // how many bytes in tail are valid
174174
}
175175

@@ -183,7 +183,7 @@ fn SipState(key0: u64, key1: u64) -> SipState {
183183
mut v1 : 0u64,
184184
mut v2 : 0u64,
185185
mut v3 : 0u64,
186-
tail : [mut 0u8,0,0,0,0,0,0,0],
186+
mut tail : [0u8,0,0,0,0,0,0,0],
187187
mut ntail : 0u,
188188
};
189189
(&state).reset();

src/librustc/middle/typeck/infer/region_inference.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1237,15 +1237,15 @@ impl RegionVarBindings {
12371237
classification: Contracting,
12381238
span: self.var_spans[var_idx],
12391239
value: NoValue,
1240-
head_edge: [mut uint::max_value, uint::max_value]
1240+
head_edge: [uint::max_value, uint::max_value]
12411241
}
12421242
});
12431243

12441244
// It would be nice to write this using map():
12451245
let mut edges = vec::with_capacity(num_edges);
12461246
for self.constraints.each_ref |constraint, span| {
12471247
edges.push(GraphEdge {
1248-
next_edge: [mut uint::max_value, uint::max_value],
1248+
next_edge: [uint::max_value, uint::max_value],
12491249
constraint: *constraint,
12501250
span: *span
12511251
});

src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub fn Parser(sess: parse_sess,
193193
token: tok0.tok,
194194
span: span0,
195195
last_span: span0,
196-
buffer: [mut {tok: tok0.tok, sp: span0}, ..4],
196+
mut buffer: [{tok: tok0.tok, sp: span0}, ..4],
197197
buffer_start: 0,
198198
buffer_end: 0,
199199
tokens_consumed: 0u,
@@ -213,7 +213,7 @@ pub struct Parser {
213213
mut token: token::Token,
214214
mut span: span,
215215
mut last_span: span,
216-
mut buffer: [mut {tok: token::Token, sp: span} * 4],
216+
mut buffer: [{tok: token::Token, sp: span} * 4],
217217
mut buffer_start: int,
218218
mut buffer_end: int,
219219
mut tokens_consumed: uint,

0 commit comments

Comments
 (0)