Rollup merge of #58821 - alex:patch-1, r=Centril
Fixed a syntax error in the pin docs
This commit is contained in:
commit
c4f693cbf2
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user