We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e04386 commit 4741ad3Copy full SHA for 4741ad3
src/liballoc/rc.rs
@@ -843,13 +843,13 @@ impl<T> Weak<T> {
843
///
844
/// use std::rc::Weak;
845
846
- /// let empty:Weak<i64> = Weak::new_downgraded();
+ /// let empty:Weak<i64> = Weak::new();
847
/// ```
848
849
#[unstable(feature = "downgraded_weak",
850
reason = "recently added",
851
issue="30425")]
852
- pub fn new_downgraded() -> Weak<T> {
+ pub fn new() -> Weak<T> {
853
unsafe {
854
Weak {
855
_ptr: Shared::new(Box::into_raw(box RcBox {
@@ -1156,8 +1156,8 @@ mod tests {
1156
}
1157
1158
#[test]
1159
- fn test_new_downgraded() {
1160
- let foo: Weak<usize> = Weak::new_downgraded();
+ fn test_new_weak() {
+ let foo: Weak<usize> = Weak::new();
1161
assert!(foo.upgrade().is_none());
1162
1163
0 commit comments