diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index e725f8629fb..90bcdb54e19 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -640,8 +640,8 @@ struct Liveness { tcx: ty::ctxt, ir: @IrMaps, s: Specials, - mut successors: ~[LiveNode], - mut users: ~[users], + successors: ~[mut LiveNode], + users: ~[mut users], // The list of node IDs for the nested loop scopes // we're in. loop_scope: DVec, diff --git a/src/librustc/middle/trans/cabi_x86_64.rs b/src/librustc/middle/trans/cabi_x86_64.rs index 699b82b7dd4..e4a70241d1a 100644 --- a/src/librustc/middle/trans/cabi_x86_64.rs +++ b/src/librustc/middle/trans/cabi_x86_64.rs @@ -127,13 +127,13 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] { } } - fn all_mem(cls: &mut [x86_64_reg_class]) { + fn all_mem(cls: &[mut x86_64_reg_class]) { for uint::range(0, cls.len()) |i| { cls[i] = memory_class; } } - fn unify(cls: &mut [x86_64_reg_class], + fn unify(cls: &[mut x86_64_reg_class], i: uint, newv: x86_64_reg_class) { if cls[i] == newv { @@ -159,7 +159,7 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] { } fn classify_struct(tys: &[TypeRef], - cls: &mut [x86_64_reg_class], i: uint, + cls: &[mut x86_64_reg_class], i: uint, off: uint) { let mut field_off = off; for vec::each(tys) |ty| { @@ -170,7 +170,7 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] { } fn classify(ty: TypeRef, - cls: &mut [x86_64_reg_class], ix: uint, + cls: &[mut x86_64_reg_class], ix: uint, off: uint) { unsafe { let t_align = ty_align(ty); @@ -220,7 +220,7 @@ fn classify_ty(ty: TypeRef) -> ~[x86_64_reg_class] { } } - fn fixup(ty: TypeRef, cls: &mut [x86_64_reg_class]) { + fn fixup(ty: TypeRef, cls: &[mut x86_64_reg_class]) { unsafe { let mut i = 0u; let llty = llvm::LLVMGetTypeKind(ty) as int; diff --git a/src/librustc/middle/trans/type_use.rs b/src/librustc/middle/trans/type_use.rs index c11d4f5ebc0..c19db4a75b9 100644 --- a/src/librustc/middle/trans/type_use.rs +++ b/src/librustc/middle/trans/type_use.rs @@ -49,7 +49,7 @@ pub const use_repr: uint = 1u; /* Dependency on size/alignment/mode and take/drop glue */ pub const use_tydesc: uint = 2u; /* Takes the tydesc, or compares */ -pub type ctx = {ccx: @crate_ctxt, mut uses: ~[type_uses]}; +pub type ctx = {ccx: @crate_ctxt, uses: ~[mut type_uses]}; pub fn type_uses_for(ccx: @crate_ctxt, fn_id: def_id, n_tps: uint) -> ~[type_uses] { diff --git a/src/librustc/middle/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs index 34798387d73..44dd65f238b 100644 --- a/src/librustc/middle/typeck/check/method.rs +++ b/src/librustc/middle/typeck/check/method.rs @@ -778,7 +778,7 @@ pub impl LookupContext { /*! * * In the event that we are invoking a method with a receiver - * of a linear borrowed type like `&mut T` or `&mut [T]`, + * of a linear borrowed type like `&mut T` or `&[mut T]`, * we will "reborrow" the receiver implicitly. For example, if * you have a call `r.inc()` and where `r` has type `&mut T`, * then we treat that like `(&mut *r).inc()`. This avoids diff --git a/src/librustc/middle/typeck/infer/region_inference.rs b/src/librustc/middle/typeck/infer/region_inference.rs index d928ad264fd..5d602ab88bb 100644 --- a/src/librustc/middle/typeck/infer/region_inference.rs +++ b/src/librustc/middle/typeck/infer/region_inference.rs @@ -1191,11 +1191,11 @@ struct GraphNode { span: span, mut classification: Classification, mut value: GraphNodeValue, - head_edge: [uint * 2], + head_edge: [mut uint * 2], // FIXME(#3226)--should not need mut } struct GraphEdge { - next_edge: [uint * 2], + next_edge: [mut uint * 2], // FIXME(#3226)--should not need mut constraint: Constraint, span: span, } @@ -1237,7 +1237,7 @@ impl RegionVarBindings { classification: Contracting, span: self.var_spans[var_idx], value: NoValue, - head_edge: [uint::max_value, uint::max_value] + head_edge: [mut uint::max_value, uint::max_value] } }); @@ -1245,7 +1245,7 @@ impl RegionVarBindings { let mut edges = vec::with_capacity(num_edges); for self.constraints.each_ref |constraint, span| { edges.push(GraphEdge { - next_edge: [uint::max_value, uint::max_value], + next_edge: [mut uint::max_value, uint::max_value], constraint: *constraint, span: *span });