[INFO] crate ubuntu-distro-info 0.3.0 is already in cache [INFO] extracting crate ubuntu-distro-info 0.3.0 into work/ex/clippy-test-run/sources/stable/reg/ubuntu-distro-info/0.3.0 [INFO] extracting crate ubuntu-distro-info 0.3.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/ubuntu-distro-info/0.3.0 [INFO] validating manifest of ubuntu-distro-info-0.3.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 ubuntu-distro-info-0.3.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 ubuntu-distro-info-0.3.0 [INFO] finished frobbing ubuntu-distro-info-0.3.0 [INFO] frobbed toml for ubuntu-distro-info-0.3.0 written to work/ex/clippy-test-run/sources/stable/reg/ubuntu-distro-info/0.3.0/Cargo.toml [INFO] started frobbing ubuntu-distro-info-0.3.0 [INFO] finished frobbing ubuntu-distro-info-0.3.0 [INFO] frobbed toml for ubuntu-distro-info-0.3.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/ubuntu-distro-info/0.3.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 ubuntu-distro-info-0.3.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/ubuntu-distro-info/0.3.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] 30cd771cc5f9e3468b442920887160502ac5a29020ee404bd71e4b2d19c61f51 [INFO] running `"docker" "start" "-a" "30cd771cc5f9e3468b442920887160502ac5a29020ee404bd71e4b2d19c61f51"` [INFO] [stderr] Checking distro-info v0.3.0 [INFO] [stderr] Checking ubuntu-distro-info v0.3.0 (/opt/crater/workdir) [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:28:62 [INFO] [stderr] | [INFO] [stderr] 28 | fn determine_day_delta(current_date: NaiveDate, target_date: &NaiveDate) -> i64 { [INFO] [stderr] | ^^^^^^^^^^ help: consider passing by value instead: `NaiveDate` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:41:55 [INFO] [stderr] | [INFO] [stderr] 41 | OutputMode::Codename => output_parts.push(format!("{}", &distro_release.series())), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `&distro_release.series().to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:42:54 [INFO] [stderr] | [INFO] [stderr] 42 | OutputMode::Release => output_parts.push(format!("{}", &distro_release.version())), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `&distro_release.version().to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:59:42 [INFO] [stderr] | [INFO] [stderr] 59 | Some(DaysMode::EolServer) => distro_release.eol_server().clone(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*distro_release.eol_server()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:70:21 [INFO] [stderr] | [INFO] [stderr] 70 | None => match days_mode { [INFO] [stderr] | _____________________^ [INFO] [stderr] 71 | | Some(DaysMode::EolServer) => output_parts.push("(unknown)".to_string()), [INFO] [stderr] 72 | | _ => (), [INFO] [stderr] 73 | | }, [INFO] [stderr] | |_____________^ help: try this: `if let Some(DaysMode::EolServer) = days_mode { output_parts.push("(unknown)".to_string()) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/main.rs:206:14 [INFO] [stderr] | [INFO] [stderr] 206 | vec![lts_releases.last().unwrap().clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::clone_double_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 206 | vec![&(*lts_releases.last().unwrap()).clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 206 | vec![&distro_info::DistroRelease::clone(lts_releases.last().unwrap())] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/main.rs:208:14 [INFO] [stderr] | [INFO] [stderr] 208 | vec![ubuntu_distro_info.supported(date).last().unwrap().clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 208 | vec![&(*ubuntu_distro_info.supported(date).last().unwrap()).clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 208 | vec![&distro_info::DistroRelease::clone(ubuntu_distro_info.supported(date).last().unwrap())] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:213:29 [INFO] [stderr] | [INFO] [stderr] 213 | .chars() [INFO] [stderr] | _____________________________^ [INFO] [stderr] 214 | | .fold(true, |acc, c| acc && c.is_lowercase()) [INFO] [stderr] | |_________________________________________________________________^ help: try: `.all(|c| c.is_lowercase())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:222:20 [INFO] [stderr] | [INFO] [stderr] 222 | if candidates.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `ubuntu-distro-info`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/main.rs:28:62 [INFO] [stderr] | [INFO] [stderr] 28 | fn determine_day_delta(current_date: NaiveDate, target_date: &NaiveDate) -> i64 { [INFO] [stderr] | ^^^^^^^^^^ help: consider passing by value instead: `NaiveDate` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:41:55 [INFO] [stderr] | [INFO] [stderr] 41 | OutputMode::Codename => output_parts.push(format!("{}", &distro_release.series())), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `&distro_release.series().to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:42:54 [INFO] [stderr] | [INFO] [stderr] 42 | OutputMode::Release => output_parts.push(format!("{}", &distro_release.version())), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `&distro_release.version().to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:59:42 [INFO] [stderr] | [INFO] [stderr] 59 | Some(DaysMode::EolServer) => distro_release.eol_server().clone(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*distro_release.eol_server()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:70:21 [INFO] [stderr] | [INFO] [stderr] 70 | None => match days_mode { [INFO] [stderr] | _____________________^ [INFO] [stderr] 71 | | Some(DaysMode::EolServer) => output_parts.push("(unknown)".to_string()), [INFO] [stderr] 72 | | _ => (), [INFO] [stderr] 73 | | }, [INFO] [stderr] | |_____________^ help: try this: `if let Some(DaysMode::EolServer) = days_mode { output_parts.push("(unknown)".to_string()) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/main.rs:206:14 [INFO] [stderr] | [INFO] [stderr] 206 | vec![lts_releases.last().unwrap().clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::clone_double_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 206 | vec![&(*lts_releases.last().unwrap()).clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 206 | vec![&distro_info::DistroRelease::clone(lts_releases.last().unwrap())] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: using `clone` on a double-reference; this will copy the reference instead of cloning the inner type [INFO] [stderr] --> src/main.rs:208:14 [INFO] [stderr] | [INFO] [stderr] 208 | vec![ubuntu_distro_info.supported(date).last().unwrap().clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_double_ref [INFO] [stderr] help: try dereferencing it [INFO] [stderr] | [INFO] [stderr] 208 | vec![&(*ubuntu_distro_info.supported(date).last().unwrap()).clone()] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] help: or try being explicit about what type to clone [INFO] [stderr] | [INFO] [stderr] 208 | vec![&distro_info::DistroRelease::clone(ubuntu_distro_info.supported(date).last().unwrap())] [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this `.fold` can be written more succinctly using another method [INFO] [stderr] --> src/main.rs:213:29 [INFO] [stderr] | [INFO] [stderr] 213 | .chars() [INFO] [stderr] | _____________________________^ [INFO] [stderr] 214 | | .fold(true, |acc, c| acc && c.is_lowercase()) [INFO] [stderr] | |_________________________________________________________________^ help: try: `.all(|c| c.is_lowercase())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unnecessary_fold)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fold [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/main.rs:222:20 [INFO] [stderr] | [INFO] [stderr] 222 | if candidates.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `candidates.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `ubuntu-distro-info`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "30cd771cc5f9e3468b442920887160502ac5a29020ee404bd71e4b2d19c61f51"` [INFO] running `"docker" "rm" "-f" "30cd771cc5f9e3468b442920887160502ac5a29020ee404bd71e4b2d19c61f51"` [INFO] [stdout] 30cd771cc5f9e3468b442920887160502ac5a29020ee404bd71e4b2d19c61f51