Skip to main content

announce_std/
error.rs

1//! announce mocks of `error` traits. Generated from newer-type-std's copies.
2
3#[allow(unused_imports)]
4use announce::announce;
5
6#[cfg(announce_std_rust_1_81)]
7/// announce mock of [`::core::error::Error`]: invoke `Error!` to receive its definition.
8///
9/// The real trait is re-exported under the same path.
10#[announce(mock = ::core::error::Error)]
11pub trait Error: ::core::fmt::Debug + ::core::fmt::Display {
12    fn source(&self) -> ::core::option::Option<&(dyn ::core::error::Error + 'static)> {
13        ::core::unimplemented!()
14    }
15}
16
17#[cfg(announce_std_rust_1_81)]
18#[doc(no_inline)]
19pub use ::core::error::Error;
20
21#[cfg(not(announce_std_rust_1_81))]
22#[cfg(feature = "std")]
23/// announce mock of [`::std::error::Error`]: invoke `Error!` to receive its definition.
24///
25/// The real trait is re-exported under the same path.
26#[announce(mock = ::std::error::Error)]
27pub trait Error: ::core::fmt::Debug + ::core::fmt::Display {
28    fn source(&self) -> ::core::option::Option<&(dyn ::std::error::Error + 'static)> {
29        ::core::unimplemented!()
30    }
31}
32
33#[cfg(not(announce_std_rust_1_81))]
34#[cfg(feature = "std")]
35#[doc(no_inline)]
36pub use ::std::error::Error;