Skip to content

Commit 2f13c3f

Browse files
committed
Rename core_reexport module to __private
1 parent 6ebe74c commit 2f13c3f

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/lib.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
#![allow(unknown_lints)]
77
#![doc(html_root_url = "https://docs.rs/pin-utils/0.1.0")]
88

9-
#[doc(hidden)]
10-
pub mod core_reexport {
11-
pub use core::*;
12-
}
13-
149
#[macro_use]
1510
mod stack_pin;
1611
#[macro_use]
1712
mod projection;
13+
14+
// Not public API.
15+
#[doc(hidden)]
16+
pub mod __private {
17+
pub use core::pin::Pin;
18+
}

src/projection.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ macro_rules! unsafe_pinned {
4545
($f:tt: $t:ty) => {
4646
#[allow(unsafe_code)]
4747
fn $f<'__a>(
48-
self: $crate::core_reexport::pin::Pin<&'__a mut Self>,
49-
) -> $crate::core_reexport::pin::Pin<&'__a mut $t> {
50-
unsafe { $crate::core_reexport::pin::Pin::map_unchecked_mut(self, |x| &mut x.$f) }
48+
self: $crate::__private::Pin<&'__a mut Self>,
49+
) -> $crate::__private::Pin<&'__a mut $t> {
50+
unsafe { $crate::__private::Pin::map_unchecked_mut(self, |x| &mut x.$f) }
5151
}
5252
};
5353
}
@@ -93,8 +93,8 @@ macro_rules! unsafe_pinned {
9393
macro_rules! unsafe_unpinned {
9494
($f:tt: $t:ty) => {
9595
#[allow(unsafe_code)]
96-
fn $f<'__a>(self: $crate::core_reexport::pin::Pin<&'__a mut Self>) -> &'__a mut $t {
97-
unsafe { &mut $crate::core_reexport::pin::Pin::get_unchecked_mut(self).$f }
96+
fn $f<'__a>(self: $crate::__private::Pin<&'__a mut Self>) -> &'__a mut $t {
97+
unsafe { &mut $crate::__private::Pin::get_unchecked_mut(self).$f }
9898
}
9999
};
100100
}

src/stack_pin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ macro_rules! pin_mut {
1919
// ever again.
2020
#[allow(unused_mut)]
2121
let mut $x = unsafe {
22-
$crate::core_reexport::pin::Pin::new_unchecked(&mut $x)
22+
$crate::__private::Pin::new_unchecked(&mut $x)
2323
};
2424
)* }
2525
}

0 commit comments

Comments
 (0)