Fixed a syntax error in the pin docs

This commit is contained in:
Alex Gaynor 2019-02-28 16:34:03 -05:00 committed by GitHub
parent 1999a22881
commit 96be181c7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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();