Skip to content

Commit bd3d30b

Browse files
committed
allow the crate to refer to itself as pin-init in doc tests
The `syn` approach requires use of `::pin_init::...` instead of the `$crate::...` construct available to declarative macros. To be able to use the `pin_init` crate from itself (which includes doc tests), we have to declare it as such. Signed-off-by: Benno Lossin <lossin@kernel.org>
1 parent a40f8a7 commit bd3d30b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ use core::{
290290
ptr::{self, NonNull},
291291
};
292292

293+
extern crate self as pin_init;
294+
293295
#[doc(hidden)]
294296
pub mod __internal;
295297
#[doc(hidden)]

0 commit comments

Comments
 (0)