File tree 5 files changed +7
-10
lines changed
5 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ matrix:
41
41
- rustup toolchain install nightly
42
42
- cargo +nightly generate-lockfile -Z minimal-versions
43
43
- cargo -V
44
- - cargo test
44
+ - cargo test --features=deny-warnings
45
45
if : branch != master OR type = pull_request
46
46
47
47
- env : TARGET=x86_64-unknown-linux-gnu
@@ -50,7 +50,7 @@ matrix:
50
50
install :
51
51
- mdbook --help || cargo install mdbook --force
52
52
script :
53
- - cargo test
53
+ - cargo test --features=deny-warnings
54
54
- cargo doc --no-deps
55
55
- (cd src/doc && mdbook build --dest-dir ../../target/doc)
56
56
if : branch != master OR type = pull_request
@@ -61,7 +61,7 @@ matrix:
61
61
before_script :
62
62
- rustup target add $ALT
63
63
script :
64
- - cargo test
64
+ - cargo test --features=deny-warnings
65
65
66
66
notifications :
67
67
email :
Original file line number Diff line number Diff line change @@ -114,10 +114,6 @@ and run with `rustup run` (e.g `rustup run nightly
114
114
<path-to-cargo >/target/debug/cargo <args >..` ) (or set the ` RUSTC` env var to point
115
115
to nightly rustc).
116
116
117
- Because the test suite has ` #![deny(warnings)] ` at times you might find it
118
- convenient to override this with ` RUSTFLAGS ` , for example
119
- ` RUSTFLAGS="--cap-lints warn" cargo build ` .
120
-
121
117
## Logging
122
118
123
119
Cargo uses [ ` env_logger ` ] ( https://docs.rs/env_logger/*/env_logger/ ) , so you can set
Original file line number Diff line number Diff line change @@ -105,5 +105,6 @@ test = false
105
105
doc = false
106
106
107
107
[features ]
108
+ deny-warnings = []
108
109
vendored-openssl = [' openssl/vendored' ]
109
110
pretty-env-logger = [' pretty_env_logger' ]
Original file line number Diff line number Diff line change @@ -25,5 +25,5 @@ test_script:
25
25
# we don't have ci time to run the full `cargo test` with `minimal-versions` like
26
26
# - if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +stable test
27
27
# so we just run `cargo check --tests` like
28
- - if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +1.31.0 check --tests
29
- - if NOT defined MINIMAL_VERSIONS cargo test
28
+ - if defined MINIMAL_VERSIONS cargo +nightly generate-lockfile -Z minimal-versions && cargo +1.31.0 check --tests --features=deny-warnings
29
+ - if NOT defined MINIMAL_VERSIONS cargo test --features=deny-warnings
Original file line number Diff line number Diff line change 1
1
#![ warn( rust_2018_idioms) ] // while we're getting used to 2018
2
- #![ deny( warnings) ]
2
+ #![ cfg_attr ( feature= " deny-warnings" , deny ( warnings) ) ]
3
3
#![ cfg_attr( feature = "cargo-clippy" , allow( blacklisted_name) ) ]
4
4
#![ cfg_attr( feature = "cargo-clippy" , allow( explicit_iter_loop) ) ]
5
5
You can’t perform that action at this time.
0 commit comments