#![forbid(unsafe_code, non_ascii_idents)]
#![deny(
future_incompatible,
keyword_idents,
noop_method_call,
unused_qualifications,
clippy::wildcard_dependencies,
clippy::empty_line_after_outer_attr
)]
#![warn(clippy::pedantic, missing_docs)]
pub use mark_flaky_tests_macro::flaky;
#[doc(hidden)]
pub mod _priv {
#[cfg(feature = "tokio")]
pub use futures;
pub trait IsFailure {
fn is_failure(&self) -> bool;
}
impl IsFailure for () {
fn is_failure(&self) -> bool {
false
}
}
impl<T: IsFailure, E> IsFailure for Result<T, E> {
fn is_failure(&self) -> bool {
self.as_ref().map(T::is_failure).unwrap_or(true)
}
}
impl IsFailure for std::convert::Infallible {
fn is_failure(&self) -> bool {
match *self {}
}
}
impl IsFailure for Never {
fn is_failure(&self) -> bool {
*self
}
}
pub trait GetNever {
type Never;
}
impl<R, F: FnOnce() -> R> GetNever for F {
type Never = R;
}
type Never = <fn() -> ! as GetNever>::Never;
}