]> git.lizzy.rs Git - rust.git/commitdiff
improve wording
authorRalf Jung <post@ralfj.de>
Tue, 19 Feb 2019 20:25:39 +0000 (21:25 +0100)
committerRalf Jung <post@ralfj.de>
Tue, 19 Feb 2019 20:25:39 +0000 (21:25 +0100)
src/libcore/pin.rs

index 68213ab01537f4bc11807f77e779f1c142aabff4..2395dce9693d1baf38c6455a47ad30ee091803d0 100644 (file)
 //!    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<T>(rc: Pin<&mut RefCell<T>) {