File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 292292//! to it *cannot* panic.
293293//!
294294//! ```
295- //! use core ::marker::PhantomPinned;
296- //! use core ::pin::Pin;
297- //! use core ::pin::pin;
295+ //! use std ::marker::PhantomPinned;
296+ //! use std ::pin::Pin;
297+ //! use std ::pin::pin;
298298//!
299299//! #[derive(Default)]
300300//! struct AddrTracker {
327327//! let mut ptr_to_pinned_tracker: Pin<&mut AddrTracker> = pin!(tracker);
328328//! ptr_to_pinned_tracker.as_mut().check_for_move();
329329//!
330- //! // Trying to access `tracker` or pass `ptr_to_pinned_tracker` to anything
331- //! // that requires mutable access to a non-pinned version of it will no longer
332- //! // compile
330+ //! // Trying to access `tracker` or pass `ptr_to_pinned_tracker` to anything that requires
331+ //! // mutable access to a non-pinned version of it will no longer compile
333332//!
334333//! // 3. We can now assume that the tracker value will never be moved, thus
335334//! // this will never panic!
You can’t perform that action at this time.
0 commit comments