Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
fu5ha authored and Manishearth committed Jan 7, 2024
1 parent f2447a6 commit 921d37d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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!
Expand Down

0 comments on commit 921d37d

Please sign in to comment.