#[doc = crate::_tags!(internal)]
#[doc = crate::_doc_meta!{location("yard")}]
#[cfg_attr(not(feature = "__docs_internal"), doc(hidden))]
#[cfg_attr(cargo_primary_package, doc(hidden))]
#[macro_export]
#[allow(clippy::crate_in_macro_def, reason = "_dep relative to macro call")]
macro_rules! _reexport· {
( rust : core $( :: $( $core_path:ident )::+)?,
$( local_module: $module_feature:literal, )?
$( extra_features: $($extra_feat:literal),+ $(,)? )?
$( extra_flags:($($extra_flag:ident),+) $(,)? )?
$( location: $($location:literal)+ ,)?
$( tag: $($tag:expr)+ ,)?
doc: $doc_line:literal,
$( +doc: $($doc_more:literal),+, )?
$( $item:ident ),*
$(@ $item_to_rename:ident as $item_renamed:ident),*
$(,)?
) => { $crate::paste! {
#[doc(inline)]
$( $(#[doc = $tag])+ )? #[doc = "<span class='stab portability' title='re-exported from rust's "
"`core`'>`core`</span>"]
#[doc = $doc_line] #[doc = $crate::_doc_meta! {
$( location(re-exported $($location)?), )?
origin(rust core $(:: $( $core_path )::+)? $(
; renamed($item_to_rename as $item_renamed)
)?),
}]
#[doc = $crate::_reexport!(@doc_local_tail $($($doc_more)+)?)]
#[cfg_attr(nightly_doc, doc(cfg(all(
$( feature = $module_feature, )?
$( all($(feature = $extra_feat),+) )?
$( all($($extra_flag),+) )?
))))]
#[cfg(all(
$( $(feature = $extra_feat),+ )?
$( $($extra_flag),+ )?
))]
pub use core :: $($( $core_path :: )+)? {
$( $item ),*
$( $item_to_rename as $item_renamed ),*
};
}};
( rust : alloc $( :: $( $alloc_path:ident )::+)?,
$( local_module: $module_feature:literal, )?
$( location: $($location:literal)+ ,)?
$( tag: $($tag:expr)+ ,)?
doc: $doc_line:literal,
$( +doc: $($doc_more:literal),+, )?
$( $item:ident ),*
$(@ $item_to_rename:ident as $item_renamed:ident),*
$(,)?
) => { $crate::paste! {
#[doc(inline)]
$( $(#[doc = $tag])+ )? #[doc = "<span class='stab portability' title='re-exported from rust's "
"`alloc`'>`alloc`</span>"]
#[doc = $doc_line] #[doc = $crate::_doc_meta! {
$( location(re-exported $($location)?), )?
origin(rust alloc $(:: $( $alloc_path )::+)? $(
; renamed($item_to_rename as $item_renamed)
)?),
}]
#[doc = $crate::_reexport!(@doc_local_tail $($($doc_more)+)?)]
#[cfg_attr(
nightly_doc,
doc(cfg(all(
$( feature = $module_feature, )?
feature = "alloc"
)))
)]
#[cfg(feature = "alloc")]
pub use alloc :: $($( $alloc_path :: )+)? {
$( $item ),*
$( $item_to_rename as $item_renamed ),*
};
}};
( rust : std $( :: $( $std_path:ident )::+)?,
$( local_module: $module_feature:literal, )?
$( location: $($location:literal)+ ,)?
$( tag: $($tag:expr)+ ,)?
doc: $doc_line:literal,
$( +doc: $($doc_more:literal),+, )?
$( $item:ident ),*
$(@ $item_to_rename:ident as $item_renamed:ident),*
$(,)?
) => { $crate::paste! {
#[doc(inline)]
$( $(#[doc = $tag])+ )? #[doc = "<span class='stab portability' title='re-exported from rust's "
"`std`'>`std`</span>"]
#[doc = $doc_line] #[doc = $crate::_doc_meta! {
$( location(re-exported $($location)?), )?
origin(rust std $(:: $( $std_path )::+)? $(
; renamed($item_to_rename as $item_renamed)
)?),
}]
#[doc = $crate::_reexport!(@doc_local_tail $($($doc_more)+)?)]
#[cfg_attr(
nightly_doc,
doc(cfg(all(
$( feature = $module_feature, )?
feature = "std"
)))
)]
#[cfg(feature = "std")]
pub use std :: $($( $std_path :: )+)? {
$( $item ),*
$( $item_to_rename as $item_renamed ),*
};
}};
( rust : not(std)|std $( :: $( $std_path:ident )::+)?,
$( local_module: $module_feature:literal, )?
$( location: $($location:literal)+ ,)?
$( tag: $($tag:expr)+ ,)?
doc: $doc_line:literal,
$( +doc: $($doc_more:literal),+, )?
$( $item:ident ),*
$(@ $item_to_rename:ident as $item_renamed:ident),*
$(,)?
) => { $crate::paste! {
#[doc(inline)]
$( $(#[doc = $tag])+ )? #[doc = $doc_line] #[doc = $crate::_doc_meta! {
$( location(re-exported $($location)?), )?
origin(rust std $(:: $( $std_path )::+)? $(
; renamed($item_to_rename as $item_renamed)
)?),
}]
#[doc = $crate::_reexport!(@doc_local_tail $($($doc_more)+)?)]
#[cfg_attr(
nightly_doc,
doc(cfg(all(
$( feature = $module_feature, )?
)))
)]
#[cfg(feature = "std")]
pub use std :: $($( $std_path :: )+)? {
$( $item ),*
$( $item_to_rename as $item_renamed ),*
};
}};
(
crate $dep_str:literal | $dep:ident,
doc: $doc_line:literal
$(, features: $( $f:literal ),+ )?
) => { $crate::paste! {
#[doc = "<span class='stab portability' title='re-exported `" $dep_str
"`'>`" $dep_str "`</span>"]
#[doc = $doc_line "\n\n---" ]
#[doc(inline)]
pub use ::$dep;
}};
(
optional_crate ($dep_safe:tt)
$dep_feat:literal, $dep_name:literal, $dep_mod:ident,
doc: $doc_line:literal
$(, features: $( $f:literal ),+ )?
) => { $crate::paste! {
#[cfg(all(feature = $dep_feat $(, $(feature = $f),+ )? ))]
$crate::items! {
#[cfg(feature = "safest")]
#[$crate::compile(diff($dep_safe, safe))]
const [<SAFEST_ $dep_name:upper>]: () = { panic![concat!["The `", $dep_name,
"` dependency is not compatible with the `safest` feature"]] };
#[doc = "<span class='stab portability' title='re-exported `" $dep_name
"`'>`" $dep_name "`</span>"]
#[doc = $doc_line "\n\n---" ]
#[cfg_attr(
nightly_doc,
doc(cfg(all(
feature = $dep_feat $(, $(feature = $f)+ )?
)))
)]
#[doc(no_inline)] pub use ::$dep_mod;
}
}};
(
$dep_feat:literal, $dep_name:literal, $dep_mod:ident $( :: $dep_path:path)?,
$( features: $( $f:literal ),+ ,)?
$( location: $($location:literal)+ ,)?
$( tag: $($tag:expr)+ ,)?
doc: $doc_line:literal,
$( +doc: $($doc_more:literal),+, )?
$( $item:ident ),*
$(@ $item_to_rename:ident as $item_renamed:ident),*
$(,)?
) => { $crate::paste! {
#[doc(inline)]
$( $(#[doc = $tag])+ )? #[doc = "<span class='stab portability' title='re-exported from the `"
$dep_name "` crate'>`" $dep_name "`</span>"]
#[doc = $doc_line] #[doc = $crate::_doc_meta! {
$( location(re-exported $($location)?), )?
origin(crate $dep_name $(
; renamed($item_to_rename as $item_renamed)
)?),
}]
#[doc = $crate::_reexport!(@doc_local_tail $($($doc_more)+)?)]
#[cfg_attr(
nightly_doc,
doc(cfg(all(
feature = $dep_feat $(, $(feature = $f)+ )?
)))
)]
#[cfg(all(feature = $dep_feat $(, $(feature = $f),+ )? ))]
pub use crate::_dep::$dep_mod $( ::$dep_path )? :: {
$( $item ),*
$( $item_to_rename as $item_renamed ),*
};
}};
(
non-optional $dep_str:literal | $dep:ident $( :: $dep_path:path)?,
$( features: $( $f:literal ),+ ,)?
$( local_module: $module_feature:literal ,)?
$( location: $($location:literal)+ ,)?
$( tag: $($tag:expr)+ ,)?
doc: $doc_line:literal,
$( +doc: $($doc_more:literal),+, )?
$( $item:ident ),*
$(@ $item_to_rename:ident as $item_renamed:ident),*
$(,)?
) => { $crate::paste! {
#[doc(inline)]
$( $(#[doc = $tag])+ )? #[doc = "<span class='stab portability' title='re-exported from the `"
$dep_str "` crate'>`" $dep_str "`</span>"]
#[doc = $crate::_doc_meta! {
$( location(re-exported $($location)?), )?
origin(crate $dep_str => $dep_name $(
// origin(crate $dep_name $( // simpler form
; renamed($item_to_rename as $item_renamed)
)?),
}]
#[doc = $crate::_reexport!(@doc_local_tail $($($doc_more)+)?)]
#[cfg_attr(nightly_doc, doc(cfg(all(
$( feature = $module_feature ,)?
$( $( feature = $f ),+ )?
))))]
#[cfg(all( $($( feature = $f )+)? ))]
pub use ::$dep $( ::$dep_path )? :: {
$( $item ),*
$( $item_to_rename as $item_renamed ),*
};
}};
(@doc_local_tail) => {
concat!(
"\n\n---\n\n",
"<span class='stab portability' title='Upstream/original documentation'>📜</span><br>"
)
};
(@doc_local_tail $($doc_more:expr)+) => {
concat!(
"\n\n", $($doc_more, "\n\n",)+
"\n\n---\n\n---\n\n",
"<span class='stab portability' title='Upstream/original documentation'>📜</span><br>"
)
};
}
#[doc(inline)]
pub use _reexport· as _reexport;