Skip to content

Commit 31d5ffc

Browse files
committed
make std::managed private
This removes two tests built on `managed::refcount`, but these issues are well-covered elsewhere for non-managed types.
1 parent 7e7a5e3 commit 31d5ffc

File tree

4 files changed

+1
-87
lines changed

4 files changed

+1
-87
lines changed

src/libstd/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub mod ascii;
134134

135135
pub mod ptr;
136136
pub mod owned;
137-
pub mod managed;
137+
mod managed;
138138
mod reference;
139139
pub mod rc;
140140
pub mod gc;

src/libstd/managed.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
1313
#[cfg(not(test))] use cmp::*;
1414

15-
/// Returns the refcount of a shared box (as just before calling this)
16-
#[inline]
17-
pub fn refcount<T>(t: @T) -> uint {
18-
use raw::Repr;
19-
unsafe { (*t.repr()).ref_count - 1 }
20-
}
21-
2215
/// Determine if two shared boxes point to the same object
2316
#[inline]
2417
pub fn ptr_eq<T>(a: @T, b: @T) -> bool {
@@ -66,14 +59,3 @@ fn test() {
6659
assert!((!ptr_eq::<int>(x, y)));
6760
assert!((!ptr_eq::<int>(y, x)));
6861
}
69-
70-
#[test]
71-
fn refcount_test() {
72-
use clone::Clone;
73-
74-
let x = @3;
75-
assert_eq!(refcount(x), 1);
76-
let y = x.clone();
77-
assert_eq!(refcount(x), 2);
78-
assert_eq!(refcount(y), 2);
79-
}

src/test/run-pass/match-pattern-drop.rs

Lines changed: 0 additions & 44 deletions
This file was deleted.

src/test/run-pass/unique-copy-box.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)