diff options
| author | Ben Striegel <ben.striegel@gmail.com> | 2013-02-07 23:23:43 -0500 |
|---|---|---|
| committer | Ben Striegel <ben.striegel@gmail.com> | 2013-02-13 12:47:43 -0500 |
| commit | e58c812f7761228281aaf3140e53cc2e9945760a (patch) | |
| tree | 094fd1d223a11b86dc0125f45ee165177f718360 | |
| parent | 6016214101d40c627f2c52412fb77d56254c901e (diff) | |
| download | rust-e58c812f7761228281aaf3140e53cc2e9945760a.tar.gz rust-e58c812f7761228281aaf3140e53cc2e9945760a.zip | |
Partially de-vec-mut librustc
| -rw-r--r-- | src/librustc/middle/trans/cabi_x86_64.rs | 10 | ||||
| -rw-r--r-- | src/librustc/middle/typeck/check/method.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/librustc/middle/trans/cabi_x86_64.rs b/src/librustc/middle/trans/cabi_x86_64.rs index d3eb2157ee3..043ee411527 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/typeck/check/method.rs b/src/librustc/middle/typeck/check/method.rs index 463ae3201a4..45b0fa962ad 100644 --- a/src/librustc/middle/typeck/check/method.rs +++ b/src/librustc/middle/typeck/check/method.rs @@ -779,7 +779,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 |
