Skip to content

Commit a4003e1

Browse files
committed
allow doctests to refer to the pin-init crate
The next commit will name the pin-init crate from proc macros via `::pin_init`. For this to work within tests of the pin-init crate itself, it needs to be able to refer to itself via that name. Thus add the required code for the name to be available. Signed-off-by: Benno Lossin <[email protected]>
1 parent a1b9d79 commit a4003e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ mod alloc;
300300
#[cfg(any(feature = "std", feature = "alloc"))]
301301
pub use alloc::InPlaceInit;
302302

303+
#[allow(unused_extern_crates)]
304+
extern crate self as pin_init;
305+
303306
/// Used to specify the pinning information of the fields of a struct.
304307
///
305308
/// This is somewhat similar in purpose as

0 commit comments

Comments
 (0)