summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index dcd75dd..111b343 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,14 +1,23 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(clippy::nursery)]
#![warn(clippy::pedantic)]
+#![allow(clippy::module_name_repetitions)]
+
+#[cfg(all(feature = "alloc", not(feature = "std")))]
+extern crate alloc;
use core::fmt::{self, Debug, Display};
#[cfg(feature = "std")]
use std::error::Error;
+#[cfg(feature = "alloc")]
+pub use unexpected::UnexpectedError;
pub use Expect::{Expected, Unexpected};
+#[cfg(feature = "alloc")]
+mod unexpected;
+
/// `Expect` is a type that represents either the expected error type
/// ([`Expected`]) or an unexpected error ([`Unexpected`]).
///