diff --git a/.travis.yml b/.travis.yml index 8e097f5..dbb0755 100644 --- a/.travis.yml +++ b/.travis.yml @@ -108,6 +108,13 @@ matrix: rust: nightly before_script: rustup component add rustfmt-preview script: cargo fmt --all -- --check + - name: "clippy" + install: true + rust: nightly + before_script: rustup component add clippy-preview + script: + - cargo clippy -p jemalloc-sys -- -D clippy::pedantic + - cargo clippy -p jemallocator -- -D clippy::pedantic - name: "Shellcheck" install: true script: shellcheck ci/*.sh diff --git a/jemalloc-sys/src/lib.rs b/jemalloc-sys/src/lib.rs index d531208..2b74dab 100644 --- a/jemalloc-sys/src/lib.rs +++ b/jemalloc-sys/src/lib.rs @@ -41,6 +41,10 @@ //! [jemalloc_mallctl]: http://jemalloc.net/jemalloc.3.html#mallctl_namespace #![no_std] #![allow(non_snake_case, non_camel_case_types)] +#![cfg_attr( + feature = "cargo-clippy", + allow(clippy::cast_possible_truncation, clippy::cast_possible_wrap) +)] extern crate libc;