Skip to content

Commit 94350bd

Browse files
committed
Suppress it in .cirrus.toml instead
1 parent 3a95261 commit 94350bd

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

.cirrus.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cargo_cache:
55
env:
66
# Build by default; don't just check
77
BUILD: build
8+
CLIPPYFLAGS: -D warnings
89
RUSTFLAGS: -D warnings
910
RUSTDOCFLAGS: -D warnings
1011
TOOL: cargo
@@ -18,7 +19,7 @@ build: &BUILD
1819
- . $HOME/.cargo/env || true
1920
- $TOOL +$TOOLCHAIN $BUILD $ZFLAGS --target $TARGET --all-targets
2021
- $TOOL +$TOOLCHAIN doc $ZFLAGS --no-deps --target $TARGET
21-
- $TOOL +$TOOLCHAIN clippy $ZFLAGS --target $TARGET -- -D warnings
22+
- $TOOL +$TOOLCHAIN clippy $ZFLAGS --target $TARGET -- $CLIPPYFLAGS
2223

2324
# Tests that do require executing the binaries
2425
test: &TEST
@@ -239,6 +240,10 @@ task:
239240
image: rustlang/rust:nightly
240241
env:
241242
BUILD: check
243+
# Must allow here rather than in lib.rs because this lint doesn't exist
244+
# prior to Rust 1.57.0
245+
# https://github.com/rust-lang/rust-clippy/issues/7718
246+
CLIPPYFLAGS: -D warnings -A clippy::if_then_panic
242247
TOOLCHAIN: nightly
243248
ZFLAGS: -Zbuild-std
244249
matrix:

src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
#![deny(missing_copy_implementations)]
1313
#![deny(missing_debug_implementations)]
1414
#![warn(missing_docs)]
15-
// Because we run clippy on both nightly and 1.4.60
16-
#![allow(clippy::unknown_clippy_lints)]
17-
#![allow(clippy::if_then_panic)] // Too pedantic
1815

1916
// Re-exported external crates
2017
pub use libc;

test/test.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// Because we run clippy on both nightly and 1.4.60
2-
#![allow(clippy::unknown_clippy_lints)]
3-
#![allow(clippy::if_then_panic)] // Too pedantic
4-
51
#[macro_use]
62
extern crate cfg_if;
73
#[cfg_attr(not(target_os = "redox"), macro_use)]

0 commit comments

Comments
 (0)