diff options
| author | kennytm <kennytm@gmail.com> | 2019-03-02 14:55:16 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2019-03-02 22:58:32 +0800 |
| commit | c4f693cbf254ecf96f626fcd59d60344b04a71e5 (patch) | |
| tree | 28f1308fb0215e73a03e5d2d351ce7e28b89e70c | |
| parent | 8bdd948b31881d890ec0de5abbff3aba4ec09f71 (diff) | |
| parent | 96be181c7ed004b2892addc22c285b321e029fd9 (diff) | |
| download | rust-c4f693cbf254ecf96f626fcd59d60344b04a71e5.tar.gz rust-c4f693cbf254ecf96f626fcd59d60344b04a71e5.zip | |
Rollup merge of #58821 - alex:patch-1, r=Centril
Fixed a syntax error in the pin docs
| -rw-r--r-- | src/libcore/pin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs index f9f20dcea9e..835357b4e01 100644 --- a/src/libcore/pin.rs +++ b/src/libcore/pin.rs @@ -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(); |
