mirror of
https://github.com/openharmony/third_party_rust_pin-utils.git
synced 2026-07-01 21:44:22 -04:00
chore(lib): core lib reexport
This commit is contained in:
@@ -6,6 +6,11 @@
|
||||
#![allow(unknown_lints)]
|
||||
#![doc(html_root_url = "https://docs.rs/pin-utils/0.1.0")]
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod core_reexport {
|
||||
pub use core::*;
|
||||
}
|
||||
|
||||
#[macro_use]
|
||||
mod stack_pin;
|
||||
#[macro_use]
|
||||
|
||||
+2
-2
@@ -90,10 +90,10 @@ macro_rules! unsafe_unpinned {
|
||||
($f:tt: $t:ty) => (
|
||||
#[allow(unsafe_code)]
|
||||
fn $f<'__a>(
|
||||
self: ::core::pin::Pin<&'__a mut Self>
|
||||
self: $crate::core_reexport::pin::Pin<&'__a mut Self>
|
||||
) -> &'__a mut $t {
|
||||
unsafe {
|
||||
&mut ::core::pin::Pin::get_unchecked_mut(self).$f
|
||||
&mut $crate::core_reexport::pin::Pin::get_unchecked_mut(self).$f
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ macro_rules! pin_mut {
|
||||
// ever again.
|
||||
#[allow(unused_mut)]
|
||||
let mut $x = unsafe {
|
||||
::core::pin::Pin::new_unchecked(&mut $x)
|
||||
$crate::core_reexport::pin::Pin::new_unchecked(&mut $x)
|
||||
};
|
||||
)* }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user