We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2885987 commit b369af8Copy full SHA for b369af8
library/alloc/src/rc/tests.rs
@@ -103,7 +103,7 @@ fn test_weak_count() {
103
let w = Rc::downgrade(&a);
104
assert!(Rc::strong_count(&a) == 1);
105
assert!(Rc::weak_count(&a) == 1);
106
- let r = Rc::as_weak(&a);
+ let r: &Weak<i32> = Rc::as_weak(&a);
107
108
109
assert!(r.as_ptr() == Rc::as_ptr(&a));
library/alloc/src/sync/tests.rs
@@ -314,7 +314,7 @@ fn test_weak_count() {
314
let w = Arc::downgrade(&a);
315
assert!(Arc::strong_count(&a) == 1);
316
assert!(Arc::weak_count(&a) == 1);
317
- let r = Arc::as_weak(&a);
+ let r: &Weak<i32> = Arc::as_weak(&a);
318
319
320
assert!(r.as_ptr() == Arc::as_ptr(&a));
0 commit comments