Add placeholder std feature

This commit is contained in:
David Tolnay 2019-10-05 16:04:13 -04:00
parent 31aedf1c9d
commit 79c3776e92
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 7 additions and 0 deletions

View File

@ -8,3 +8,7 @@ description = "A better Box<dyn Error>"
repository = "https://github.com/dtolnay/anyhow"
documentation = "https://docs.rs/anyhow"
readme = "README.md"
[features]
default = ["std"]
std = []

View File

@ -4,6 +4,9 @@ mod as_dyn_error;
mod context;
mod error;
#[cfg(not(feature = "std"))]
compile_error!("no_std support is not implemented yet");
pub use crate::as_dyn_error::AsDynError;
pub use crate::context::Context;
pub use crate::error::{Chain, Error};