Skip to content

Commit 155f81d

Browse files
committed
Revert RIMOV on librustc
1 parent 13076eb commit 155f81d

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/librustc/middle/liveness.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,8 @@ struct Liveness {
640640
tcx: ty::ctxt,
641641
ir: @IrMaps,
642642
s: Specials,
643-
mut successors: ~[LiveNode],
644-
mut users: ~[users],
643+
successors: ~[mut LiveNode],
644+
users: ~[mut users],
645645
// The list of node IDs for the nested loop scopes
646646
// we're in.
647647
loop_scope: DVec<node_id>,

src/librustc/middle/trans/cabi_x86_64.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,13 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] {
127127
}
128128
}
129129

130-
fn all_mem(cls: &mut [x86_64_reg_class]) {
130+
fn all_mem(cls: &[mut x86_64_reg_class]) {
131131
for uint::range(0, cls.len()) |i| {
132132
cls[i] = memory_class;
133133
}
134134
}
135135

136-
fn unify(cls: &mut [x86_64_reg_class],
136+
fn unify(cls: &[mut x86_64_reg_class],
137137
i: uint,
138138
newv: x86_64_reg_class) {
139139
if cls[i] == newv {
@@ -159,7 +159,7 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] {
159159
}
160160

161161
fn classify_struct(tys: &[TypeRef],
162-
cls: &mut [x86_64_reg_class], i: uint,
162+
cls: &[mut x86_64_reg_class], i: uint,
163163
off: uint) {
164164
let mut field_off = off;
165165
for vec::each(tys) |ty| {
@@ -170,7 +170,7 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] {
170170
}
171171

172172
fn classify(ty: TypeRef,
173-
cls: &mut [x86_64_reg_class], ix: uint,
173+
cls: &[mut x86_64_reg_class], ix: uint,
174174
off: uint) {
175175
unsafe {
176176
let t_align = ty_align(ty);
@@ -220,7 +220,7 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] {
220220
}
221221
}
222222

223-
fn fixup(ty: TypeRef, cls: &mut [x86_64_reg_class]) {
223+
fn fixup(ty: TypeRef, cls: &[mut x86_64_reg_class]) {
224224
unsafe {
225225
let mut i = 0u;
226226
let llty = llvm::LLVMGetTypeKind(ty) as int;

src/librustc/middle/trans/type_use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub const use_repr: uint = 1u; /* Dependency on size/alignment/mode and
4949
take/drop glue */
5050
pub const use_tydesc: uint = 2u; /* Takes the tydesc, or compares */
5151

52-
pub type ctx = {ccx: @crate_ctxt, mut uses: ~[type_uses]};
52+
pub type ctx = {ccx: @crate_ctxt, uses: ~[mut type_uses]};
5353

5454
pub fn type_uses_for(ccx: @crate_ctxt, fn_id: def_id, n_tps: uint)
5555
-> ~[type_uses] {

src/librustc/middle/typeck/check/method.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ pub impl LookupContext {
778778
/*!
779779
*
780780
* In the event that we are invoking a method with a receiver
781-
* of a linear borrowed type like `&mut T` or `&mut [T]`,
781+
* of a linear borrowed type like `&mut T` or `&[mut T]`,
782782
* we will "reborrow" the receiver implicitly. For example, if
783783
* you have a call `r.inc()` and where `r` has type `&mut T`,
784784
* then we treat that like `(&mut *r).inc()`. This avoids

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,11 +1191,11 @@ struct GraphNode {
11911191
span: span,
11921192
mut classification: Classification,
11931193
mut value: GraphNodeValue,
1194-
head_edge: [uint * 2],
1194+
head_edge: [mut uint * 2], // FIXME(#3226)--should not need mut
11951195
}
11961196

11971197
struct GraphEdge {
1198-
next_edge: [uint * 2],
1198+
next_edge: [mut uint * 2], // FIXME(#3226)--should not need mut
11991199
constraint: Constraint,
12001200
span: span,
12011201
}
@@ -1237,15 +1237,15 @@ impl RegionVarBindings {
12371237
classification: Contracting,
12381238
span: self.var_spans[var_idx],
12391239
value: NoValue,
1240-
head_edge: [uint::max_value, uint::max_value]
1240+
head_edge: [mut 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: [uint::max_value, uint::max_value],
1248+
next_edge: [mut uint::max_value, uint::max_value],
12491249
constraint: *constraint,
12501250
span: *span
12511251
});

0 commit comments

Comments
 (0)