Skip to content

Commit 97295c3

Browse files
committed
---
yaml --- r: 63134 b: refs/heads/snap-stage3 c: 470bf0d h: refs/heads/master v: v3
1 parent f068b94 commit 97295c3

File tree

8 files changed

+9
-14
lines changed

8 files changed

+9
-14
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 878a9b92ebe1d55c119d9c6ae4636c31ca6d6cd6
4+
refs/heads/snap-stage3: 470bf0dfb362e7494cfddf4e7d443e1264dfdf2f
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ impl Drop for PoisonOnFail {
263263

264264
fn PoisonOnFail<'r>(failed: &'r mut bool) -> PoisonOnFail {
265265
PoisonOnFail {
266-
failed: ptr::to_mut_unsafe_ptr(failed)
266+
failed: failed
267267
}
268268
}
269269

branches/snap-stage3/src/librustc/lib/llvm.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2117,8 +2117,7 @@ pub fn struct_tys(struct_ty: TypeRef) -> ~[TypeRef] {
21172117
return ~[];
21182118
}
21192119
let mut elts = vec::from_elem(n_elts, ptr::null());
2120-
llvm::LLVMGetStructElementTypes(
2121-
struct_ty, ptr::to_mut_unsafe_ptr(&mut elts[0]));
2120+
llvm::LLVMGetStructElementTypes(struct_ty, &mut elts[0]);
21222121
return elts;
21232122
}
21242123
}

branches/snap-stage3/src/librustc/middle/trans/cabi_mips.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ fn struct_tys(ty: TypeRef) -> ~[TypeRef] {
3838
return ~[];
3939
}
4040
let mut elts = vec::from_elem(n as uint, ptr::null());
41-
llvm::LLVMGetStructElementTypes(ty,
42-
ptr::to_mut_unsafe_ptr(&mut elts[0]));
41+
llvm::LLVMGetStructElementTypes(ty, &mut elts[0]);
4342
return elts;
4443
}
4544
}

branches/snap-stage3/src/librustc/middle/trans/common.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,7 @@ pub fn T_tydesc_field(cx: @CrateContext, field: uint) -> TypeRef {
964964
let mut tydesc_elts: ~[TypeRef] =
965965
vec::from_elem::<TypeRef>(abi::n_tydesc_fields,
966966
T_nil());
967-
llvm::LLVMGetStructElementTypes(
968-
cx.tydesc_type,
969-
ptr::to_mut_unsafe_ptr(&mut tydesc_elts[0]));
967+
llvm::LLVMGetStructElementTypes(cx.tydesc_type, &mut tydesc_elts[0]);
970968
let t = llvm::LLVMGetElementType(tydesc_elts[field]);
971969
return t;
972970
}

branches/snap-stage3/src/libstd/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ pub fn real_args() -> ~[~str] {
11791179
#[cfg(windows)]
11801180
pub fn real_args() -> ~[~str] {
11811181
let mut nArgs: c_int = 0;
1182-
let lpArgCount = ptr::to_mut_unsafe_ptr(&mut nArgs);
1182+
let lpArgCount: *mut c_int = &mut nArgs;
11831183
let lpCmdLine = unsafe { GetCommandLineW() };
11841184
let szArgList = unsafe { CommandLineToArgvW(lpCmdLine, lpArgCount) };
11851185

branches/snap-stage3/src/libstd/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,8 +1315,8 @@ pub fn swap<T>(v: &mut [T], a: uint, b: uint) {
13151315
unsafe {
13161316
// Can't take two mutable loans from one vector, so instead just cast
13171317
// them to their raw pointers to do the swap
1318-
let pa: *mut T = ptr::to_mut_unsafe_ptr(&mut v[a]);
1319-
let pb: *mut T = ptr::to_mut_unsafe_ptr(&mut v[b]);
1318+
let pa: *mut T = &mut v[a];
1319+
let pb: *mut T = &mut v[b];
13201320
ptr::swap_ptr(pa, pb);
13211321
}
13221322
}

branches/snap-stage3/src/test/run-pass/swap-overlapping.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ pub fn main() {
2626

2727
fn do_swap(test: &mut TestDescAndFn) {
2828
unsafe {
29-
ptr::swap_ptr(ptr::to_mut_unsafe_ptr(test),
30-
ptr::to_mut_unsafe_ptr(test));
29+
ptr::swap_ptr(test, test);
3130
}
3231
}
3332

0 commit comments

Comments
 (0)