summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2019-11-24 11:19:29 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-11-25 17:35:45 +0100
commit880de82108cf7668870f0b2dc5660b2dac03040d (patch)
tree7f1f9403f004cecb180a9b9562090419fbcd767f
parentb44be6e3dbce03857c6eac221b1350acd68cb357 (diff)
Move warnings check on the CI
Always building with `deny(warnings)` leads to messups such as https://docs.rs/crate/bindgen/0.52.0/builds/199624
-rwxr-xr-xci/assert-warnings.sh6
-rwxr-xr-xci/script.sh1
-rw-r--r--src/features.rs1
-rw-r--r--src/lib.rs1
4 files changed, 7 insertions, 2 deletions
diff --git a/ci/assert-warnings.sh b/ci/assert-warnings.sh
new file mode 100755
index 00000000..62c12c42
--- /dev/null
+++ b/ci/assert-warnings.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -xeu
+cd "$(dirname "$0")/.."
+
+cargo rustc --lib --features "$BINDGEN_FEATURES" -- -Dwarnings
diff --git a/ci/script.sh b/ci/script.sh
index b3a0675a..83f2a69e 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -38,6 +38,7 @@ case "$BINDGEN_JOB" in
"misc")
./ci/assert-docs.sh
+ ./ci/assert-warnings.sh
./ci/test-book.sh
./ci/no-includes.sh
./ci/assert-rustfmt.sh
diff --git a/src/features.rs b/src/features.rs
index 94ae645f..c130dd6f 100644
--- a/src/features.rs
+++ b/src/features.rs
@@ -1,7 +1,6 @@
//! Contains code for selecting features
#![deny(missing_docs)]
-#![deny(warnings)]
#![deny(unused_extern_crates)]
use std::io;
diff --git a/src/lib.rs b/src/lib.rs
index 8c8dd198..e7ed376f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,7 +8,6 @@
//! See the [Users Guide](https://rust-lang.github.io/rust-bindgen/) for
//! additional documentation.
#![deny(missing_docs)]
-#![deny(warnings)]
#![deny(unused_extern_crates)]
// To avoid rather annoying warnings when matching with CXCursor_xxx as a
// constant.