From 921d37dbd57541e1b6fe97c439cef307d47da7f4 Mon Sep 17 00:00:00 2001 From: Gray Olson Date: Thu, 28 Sep 2023 15:37:29 +0200 Subject: [PATCH] fix imports --- library/core/src/pin.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/library/core/src/pin.rs b/library/core/src/pin.rs index 5ddd0c29adf3..19beaf2a6745 100644 --- a/library/core/src/pin.rs +++ b/library/core/src/pin.rs @@ -292,9 +292,9 @@ //! to it *cannot* panic. //! //! ``` -//! use core::marker::PhantomPinned; -//! use core::pin::Pin; -//! use core::pin::pin; +//! use std::marker::PhantomPinned; +//! use std::pin::Pin; +//! use std::pin::pin; //! //! #[derive(Default)] //! struct AddrTracker { @@ -327,9 +327,8 @@ //! let mut ptr_to_pinned_tracker: Pin<&mut AddrTracker> = pin!(tracker); //! ptr_to_pinned_tracker.as_mut().check_for_move(); //! -//! // Trying to access `tracker` or pass `ptr_to_pinned_tracker` to anything -//! // that requires mutable access to a non-pinned version of it will no longer -//! // compile +//! // Trying to access `tracker` or pass `ptr_to_pinned_tracker` to anything that requires +//! // mutable access to a non-pinned version of it will no longer compile //! //! // 3. We can now assume that the tracker value will never be moved, thus //! // this will never panic!