/// Drops the `Weak<T>`.
///
/// This will decrement the weak reference count.
///
/// # Examples
///
/// ```
/// #![feature(rc_weak)]
///
/// use std::rc::Rc;
///
/// {
///     let five = Rc::new(5);
///     let weak_five = Rc::downgrade(&five);
///
///     // stuff
///
///     drop(weak_five); // explicit drop
/// }
/// {
///     let five = Rc::new(5);
///     let weak_five = Rc::downgrade(&five);
///
///     // stuff
///
/// } // implicit drop
/// ```
Drops the `Weak`.
This will decrement the weak reference count.
Drops the ` Weak ` . This will decrement the weak reference count .
fn drop(&mut self) {
        unsafe {
            let ptr = *self._ptr;
            if !(*(&ptr as *const _ as *const *const ())).is_null() &&
                ptr as *const () as usize != mem::POST_DROP_USIZE {
                self.dec_weak();
                // the weak count starts at 1, and will only go to zero if all
                // the strong pointers have disappeared.
                if self.weak() == 0 {
                    deallocate(ptr as *mut u8, size_of_val(&*ptr),
                               align_of_val(&*ptr))
                }
            }
        }
    }
fn drop ( & mut self ) { unsafe { let ptr = * self . _ptr ; if ! ( * ( & ptr as * const _ as * const * const ( ) ) ) . is_null ( ) && ptr as * const ( ) as usize != mem :: POST_DROP_USIZE { self . dec_weak ( ) ; // the weak count starts at 1, and will only go to zero if all // the strong pointers have disappeared. if self . weak ( ) == 0 { deallocate ( ptr as * mut u8 , size_of_val ( & * ptr ) , align_of_val ( & * ptr ) ) } } } }
Drops the `Weak<T>`.
Drops the ` Weak<T > ` .
&mut self
examples
None
![feature(rc_weak)]
use std::rc::Rc.

{
let five = Rc::new(5);
let weak_five = Rc::downgrade(&five).

stuff

drop(weak_five); // explicit drop
}
{
let five = Rc::new(5);
let weak_five = Rc::downgrade(&five).

stuff

} // implicit drop
```
use std :: rc :: Rc . { let five = Rc :: new ( 5 ) ; let weak_five = Rc :: downgrade ( &five ) . stuff drop ( weak_five ) ; // explicit drop } { let five = Rc :: new ( 5 ) ; let weak_five = Rc :: downgrade ( &five ) . stuff } // implicit drop ` ` `