From d5df8a49d73c273aa9feb5f508e16f939af5ab34 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 19 Feb 2019 21:25:39 +0100 Subject: [PATCH] improve wording --- src/libcore/pin.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcore/pin.rs b/src/libcore/pin.rs index 68213ab0153..2395dce9693 100644 --- a/src/libcore/pin.rs +++ b/src/libcore/pin.rs @@ -205,8 +205,8 @@ //! does not cause unsoundness.) //! 5. You must not offer any other operations that could lead to data being moved out of //! the fields when your type is pinned. This is usually not a concern, but can become -//! tricky when interior mutability is involved. For example, imagine `RefCell` -//! would have a method `fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>`. +//! tricky when interior mutability is involved. For example, imagine if `RefCell` +//! 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(rc: Pin<&mut RefCell) { -- 2.44.0