From 9969f2f243efe7183294fd45df7dbd83ec8c44e5 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Sat, 26 Jan 2019 03:59:00 +0100 Subject: [PATCH] add feature to fail on warnings --- Cargo.toml | 1 + src/lib.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 136aca1..f1df2de 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ license = "MIT/Apache-2.0" [features] f16 = ["half"] +fail-on-warnings = [] [dependencies] typenum = "1.8" diff --git a/src/lib.rs b/src/lib.rs index 361dbc6..698ec51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -134,6 +134,7 @@ additional terms or conditions. #![doc(html_root_url = "https://docs.rs/fixed/0.1.4")] #![doc(test(attr(deny(warnings))))] #![cfg_attr(nightly_repr_transparent, feature(repr_transparent))] +#![cfg_attr(feature = "fail-on-warnings", deny(warnings))] #[cfg(feature = "f16")] extern crate half;