Skip to content

make std::managed private #13089

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub mod ascii;

pub mod ptr;
pub mod owned;
pub mod managed;
mod managed;
mod reference;
pub mod rc;
pub mod gc;
Expand Down
18 changes: 0 additions & 18 deletions src/libstd/managed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@

#[cfg(not(test))] use cmp::*;

/// Returns the refcount of a shared box (as just before calling this)
#[inline]
pub fn refcount<T>(t: @T) -> uint {
use raw::Repr;
unsafe { (*t.repr()).ref_count - 1 }
}

/// Determine if two shared boxes point to the same object
#[inline]
pub fn ptr_eq<T>(a: @T, b: @T) -> bool {
Expand Down Expand Up @@ -66,14 +59,3 @@ fn test() {
assert!((!ptr_eq::<int>(x, y)));
assert!((!ptr_eq::<int>(y, x)));
}

#[test]
fn refcount_test() {
use clone::Clone;

let x = @3;
assert_eq!(refcount(x), 1);
let y = x.clone();
assert_eq!(refcount(x), 2);
assert_eq!(refcount(y), 2);
}
44 changes: 0 additions & 44 deletions src/test/run-pass/match-pattern-drop.rs

This file was deleted.

24 changes: 0 additions & 24 deletions src/test/run-pass/unique-copy-box.rs

This file was deleted.