File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 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]
1510mod stack_pin;
1611#[ macro_use]
1712mod projection;
13+
14+ // Not public API.
15+ #[ doc( hidden) ]
16+ pub mod __private {
17+ pub use core:: pin:: Pin ;
18+ }
Original file line number Diff line number Diff 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 {
9393macro_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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments