Skip to content

Commit 96be181

Browse files
author
Alex Gaynor
authored
Fixed a syntax error in the pin docs
1 parent 1999a22 commit 96be181

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/pin.rs

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

0 commit comments

Comments
 (0)