File tree Expand file tree Collapse file tree 4 files changed +1
-87
lines changed Expand file tree Collapse file tree 4 files changed +1
-87
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ pub mod ascii;
134134
135135pub mod ptr;
136136pub mod owned;
137- pub mod managed;
137+ mod managed;
138138mod reference;
139139pub mod rc;
140140pub mod gc;
Original file line number Diff line number Diff line change 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]
2417pub 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- }
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments