Skip to content

Commit 792f9b3

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 8f662a7 commit 792f9b3

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
@@ -282,6 +282,9 @@ mod alloc;
282282
#[cfg(any(feature = "std", feature = "alloc"))]
283283
pub use alloc::InPlaceInit;
284284

285+
#[expect(unused_extern_crates)]
286+
extern crate self as pin_init;
287+
285288
/// Used to specify the pinning information of the fields of a struct.
286289
///
287290
/// This is somewhat similar in purpose as

0 commit comments

Comments
 (0)