Rollup merge of #58821 - alex:patch-1, r=Centril

Fixed a syntax error in the pin docs
This commit is contained in:
kennytm 2019-03-02 14:55:16 +08:00
commit c4f693cbf2
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C

View File

@ -215,7 +215,7 @@
//! had a method `fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>`.
//! Then we could do the following:
//! ```compile_fail
//! fn exploit_ref_cell<T>(rc: Pin<&mut RefCell<T>) {
//! fn exploit_ref_cell<T>(rc: Pin<&mut RefCell<T>>) {
//! { let p = rc.as_mut().get_pin_mut(); } // Here we get pinned access to the `T`.
//! let rc_shr: &RefCell<T> = rc.into_ref().get_ref();
//! let b = rc_shr.borrow_mut();