macro_rules! compat_function {
(
originally_defined_for($cfg:meta);
$(#[$attrs:meta])*
pub unsafe fn $name:ident($($arg_names:ident: $arg_types:ty),* $(,)?) -> $ret:ty $body:block
) => {
#[cfg(any(docsrs, not($cfg)))]
#[cfg_attr(docsrs, doc(cfg(all())))]
$(#[$attrs])*
pub unsafe fn $name(
$($arg_names: $arg_types,)*
) -> $ret $body
#[cfg(all($cfg, not(docsrs)))]
pub use $crate::$name;
#[cfg(test)]
paste::paste! {
#[allow(unused_imports, reason = "imports exist to try to trigger name conflicts")]
mod [<test_ $name _export>] {
use $crate::*;
use $crate::compat::*;
#[test]
fn test_export() {
let _ = $name;
}
}
}
};
}
mod py_3_13;
mod py_3_14;
mod py_3_15;
pub use self::py_3_13::*;
pub use self::py_3_14::*;
#[allow(unused_imports)]
pub use self::py_3_15::*;