[INFO] crate consul 0.2.0 is already in cache [INFO] extracting crate consul 0.2.0 into work/ex/clippy-test-run/sources/stable/reg/consul/0.2.0 [INFO] extracting crate consul 0.2.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/consul/0.2.0 [INFO] validating manifest of consul-0.2.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of consul-0.2.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing consul-0.2.0 [INFO] finished frobbing consul-0.2.0 [INFO] frobbed toml for consul-0.2.0 written to work/ex/clippy-test-run/sources/stable/reg/consul/0.2.0/Cargo.toml [INFO] started frobbing consul-0.2.0 [INFO] finished frobbing consul-0.2.0 [INFO] frobbed toml for consul-0.2.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/consul/0.2.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting consul-0.2.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/consul/0.2.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] 17440ef7c9e180b83f694bd968b796547707d69fa46c1b4390d1608658886c4d [INFO] running `"docker" "start" "-a" "17440ef7c9e180b83f694bd968b796547707d69fa46c1b4390d1608658886c4d"` [INFO] [stderr] Checking consul v0.2.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | agent:agent, [INFO] [stderr] | ^^^^^^^^^^^ help: replace it with: `agent` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | catalog: catalog, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `catalog` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:26:13 [INFO] [stderr] | [INFO] [stderr] 26 | health: health, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `health` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | session: session, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `session` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:28:13 [INFO] [stderr] | [INFO] [stderr] 28 | keystore: keystore [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `keystore` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/request.rs:36:13 [INFO] [stderr] | [INFO] [stderr] 36 | client: client, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `client` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | agent:agent, [INFO] [stderr] | ^^^^^^^^^^^ help: replace it with: `agent` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | catalog: catalog, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `catalog` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:26:13 [INFO] [stderr] | [INFO] [stderr] 26 | health: health, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `health` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | session: session, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `session` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/client.rs:28:13 [INFO] [stderr] | [INFO] [stderr] 28 | keystore: keystore [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `keystore` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/request.rs:36:13 [INFO] [stderr] | [INFO] [stderr] 36 | client: client, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `client` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/session.rs:11:25 [INFO] [stderr] | [INFO] [stderr] 11 | pub const SESSION_TTL: &'static str = "15s"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/session.rs:11:25 [INFO] [stderr] | [INFO] [stderr] 11 | pub const SESSION_TTL: &'static str = "15s"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'openssl::ssl::SslConnectorBuilder::builder_mut': SslConnectorBuilder now implements DerefMut [INFO] [stderr] --> src/request.rs:22:69 [INFO] [stderr] | [INFO] [stderr] 22 | let mut ssl_context_builder = ssl_connector_builder.builder_mut(); [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'openssl::ssl::SslConnectorBuilder::builder_mut': SslConnectorBuilder now implements DerefMut [INFO] [stderr] --> src/request.rs:22:69 [INFO] [stderr] | [INFO] [stderr] 22 | let mut ssl_context_builder = ssl_connector_builder.builder_mut(); [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/request.rs:22:21 [INFO] [stderr] | [INFO] [stderr] 22 | let mut ssl_context_builder = ssl_connector_builder.builder_mut(); [INFO] [stderr] | ----^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/session.rs:50:37 [INFO] [stderr] | [INFO] [stderr] 50 | pub fn renew(&self, session_id: &String) -> ConsulResult { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/session.rs:64:35 [INFO] [stderr] | [INFO] [stderr] 64 | pub fn end(&self, session_id: &String) -> ConsulResult<()> { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/keystore.rs:24:74 [INFO] [stderr] | [INFO] [stderr] 24 | pub fn acquire_lock(&self, key: String, address: String, session_id: &String) -> ConsulResult { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/keystore.rs:35:72 [INFO] [stderr] | [INFO] [stderr] 35 | pub fn release_lock(&self, key: String, address: &str, session_id: &String) -> ConsulResult { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/request.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | / let client; [INFO] [stderr] 19 | | if url.trim().starts_with("https") { [INFO] [stderr] 20 | | let mut ssl_connector_builder = SslConnectorBuilder::new(SslMethod::tls()).unwrap(); [INFO] [stderr] 21 | | { [INFO] [stderr] ... | [INFO] [stderr] 32 | | client = Client::new(); [INFO] [stderr] 33 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let client = if url.trim().starts_with("https") { ..; Client::with_connector(connector) } else { Client::new() };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/request.rs:22:21 [INFO] [stderr] | [INFO] [stderr] 22 | let mut ssl_context_builder = ssl_connector_builder.builder_mut(); [INFO] [stderr] | ----^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_mut)] on by default [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/session.rs:50:37 [INFO] [stderr] | [INFO] [stderr] 50 | pub fn renew(&self, session_id: &String) -> ConsulResult { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/session.rs:64:35 [INFO] [stderr] | [INFO] [stderr] 64 | pub fn end(&self, session_id: &String) -> ConsulResult<()> { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/keystore.rs:24:74 [INFO] [stderr] | [INFO] [stderr] 24 | pub fn acquire_lock(&self, key: String, address: String, session_id: &String) -> ConsulResult { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&String` instead of `&str` involves a new object where a slice will do. [INFO] [stderr] --> src/keystore.rs:35:72 [INFO] [stderr] | [INFO] [stderr] 35 | pub fn release_lock(&self, key: String, address: &str, session_id: &String) -> ConsulResult { [INFO] [stderr] | ^^^^^^^ help: change this to: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: `if _ { .. } else { .. }` is an expression [INFO] [stderr] --> src/request.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | / let client; [INFO] [stderr] 19 | | if url.trim().starts_with("https") { [INFO] [stderr] 20 | | let mut ssl_connector_builder = SslConnectorBuilder::new(SslMethod::tls()).unwrap(); [INFO] [stderr] 21 | | { [INFO] [stderr] ... | [INFO] [stderr] 32 | | client = Client::new(); [INFO] [stderr] 33 | | } [INFO] [stderr] | |_________^ help: it is more idiomatic to write: `let client = if url.trim().starts_with("https") { ..; Client::with_connector(connector) } else { Client::new() };` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_let_if_seq)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_let_if_seq [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 8.17s [INFO] running `"docker" "inspect" "17440ef7c9e180b83f694bd968b796547707d69fa46c1b4390d1608658886c4d"` [INFO] running `"docker" "rm" "-f" "17440ef7c9e180b83f694bd968b796547707d69fa46c1b4390d1608658886c4d"` [INFO] [stdout] 17440ef7c9e180b83f694bd968b796547707d69fa46c1b4390d1608658886c4d