Skip to content

Commit 4828bef

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 c9bbb3c commit 4828bef

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
@@ -290,6 +290,9 @@ mod alloc;
290290
#[cfg(any(feature = "std", feature = "alloc"))]
291291
pub use alloc::InPlaceInit;
292292

293+
#[allow(unused_extern_crates)]
294+
extern crate self as pin_init;
295+
293296
/// Used to specify the pinning information of the fields of a struct.
294297
///
295298
/// This is somewhat similar in purpose as

0 commit comments

Comments
 (0)