Skip to content

Commit 3b9848b

Browse files
committed
Remove some warnings and make tests pass.
1 parent e4c2915 commit 3b9848b

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

src/libcore/arc.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ resource arc_destruct<T>(data: *libc::c_void) {
2828
unsafe {
2929
let data: ~arc_data<T> = unsafe::reinterpret_cast(data);
3030
let new_count = rustrt::rust_atomic_decrement(&mut data.count);
31-
let data_ptr : *() = unsafe::reinterpret_cast(data);
3231
assert new_count >= 0;
3332
if new_count == 0 {
3433
// drop glue takes over.
@@ -70,7 +69,6 @@ fn clone<T: const>(rc: &arc<T>) -> arc<T> {
7069
unsafe {
7170
let ptr: ~arc_data<T> = unsafe::reinterpret_cast(**rc);
7271
let new_count = rustrt::rust_atomic_increment(&mut ptr.count);
73-
let data_ptr : *() = unsafe::reinterpret_cast(ptr);
7472
assert new_count >= 2;
7573
unsafe::forget(ptr);
7674
}
@@ -97,7 +95,6 @@ impl methods<T: send> for exclusive<T> {
9795
// this makes me nervous...
9896
let ptr: ~arc_data<ex_data<T>> = unsafe::reinterpret_cast(*self);
9997
let new_count = rustrt::rust_atomic_increment(&mut ptr.count);
100-
let data_ptr : *() = unsafe::reinterpret_cast(ptr);
10198
assert new_count > 1;
10299
unsafe::forget(ptr);
103100
}

src/libcore/vec.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,13 +2193,6 @@ mod tests {
21932193
assert addr == addr_imm;
21942194
}
21952195

2196-
#[test]
2197-
fn test_unshift() {
2198-
let mut x = [1, 2, 3];
2199-
unshift(x, 0);
2200-
assert x == [0, 1, 2, 3];
2201-
}
2202-
22032196
#[test]
22042197
fn test_capacity() {
22052198
let mut v = [0u64];

0 commit comments

Comments
 (0)