Skip to content

Commit

Permalink
Rollup merge of rust-lang#58821 - alex:patch-1, r=Centril
Browse files Browse the repository at this point in the history
Fixed a syntax error in the pin docs
  • Loading branch information
kennytm committed Mar 2, 2019
2 parents 8bdd948 + 96be181 commit c4f693c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit c4f693c

Please sign in to comment.