File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ fn test_weak_count() {
103
103
let w = Rc :: downgrade ( & a) ;
104
104
assert ! ( Rc :: strong_count( & a) == 1 ) ;
105
105
assert ! ( Rc :: weak_count( & a) == 1 ) ;
106
- let r = Rc :: as_weak ( & a) ;
106
+ let r: & Weak < i32 > = Rc :: as_weak ( & a) ;
107
107
assert ! ( Rc :: strong_count( & a) == 1 ) ;
108
108
assert ! ( Rc :: weak_count( & a) == 1 ) ;
109
109
assert ! ( r. as_ptr( ) == Rc :: as_ptr( & a) ) ;
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ fn test_weak_count() {
314
314
let w = Arc :: downgrade ( & a) ;
315
315
assert ! ( Arc :: strong_count( & a) == 1 ) ;
316
316
assert ! ( Arc :: weak_count( & a) == 1 ) ;
317
- let r = Arc :: as_weak ( & a) ;
317
+ let r: & Weak < i32 > = Arc :: as_weak ( & a) ;
318
318
assert ! ( Arc :: strong_count( & a) == 1 ) ;
319
319
assert ! ( Arc :: weak_count( & a) == 1 ) ;
320
320
assert ! ( r. as_ptr( ) == Arc :: as_ptr( & a) ) ;
You can’t perform that action at this time.
0 commit comments