From 79c3776e925dd12f2ff76e7d53bb99c6dd5ee70f Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 5 Oct 2019 16:04:13 -0400 Subject: [PATCH] Add placeholder std feature --- Cargo.toml | 4 ++++ src/lib.rs | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index b777067..3ab82d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,3 +8,7 @@ description = "A better Box" repository = "https://github.com/dtolnay/anyhow" documentation = "https://docs.rs/anyhow" readme = "README.md" + +[features] +default = ["std"] +std = [] diff --git a/src/lib.rs b/src/lib.rs index 927638c..6299dc0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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};