[INFO] cloning repository https://github.com/kraktus/map-of-indexes [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/kraktus/map-of-indexes" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkraktus%2Fmap-of-indexes", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkraktus%2Fmap-of-indexes'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 6c1bf5fde8f629a9b6e8a090b6439874307c3706 [INFO] linting kraktus/map-of-indexes against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkraktus%2Fmap-of-indexes" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/kraktus/map-of-indexes [INFO] finished tweaking git repo https://github.com/kraktus/map-of-indexes [INFO] tweaked toml for git repo https://github.com/kraktus/map-of-indexes written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/kraktus/map-of-indexes on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/kraktus/map-of-indexes already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 78c4de8ee95ac8baf33a41ecdc9266adc86675151f3635706bd502d8b0321c2c [INFO] running `Command { std: "docker" "start" "-a" "78c4de8ee95ac8baf33a41ecdc9266adc86675151f3635706bd502d8b0321c2c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "78c4de8ee95ac8baf33a41ecdc9266adc86675151f3635706bd502d8b0321c2c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "78c4de8ee95ac8baf33a41ecdc9266adc86675151f3635706bd502d8b0321c2c", kill_on_drop: false }` [INFO] [stdout] 78c4de8ee95ac8baf33a41ecdc9266adc86675151f3635706bd502d8b0321c2c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9fe30c02e62cf3dd2dfbbc293c4ebe8ba909a46c7f082cac80174687f8ec7e39 [INFO] running `Command { std: "docker" "start" "-a" "9fe30c02e62cf3dd2dfbbc293c4ebe8ba909a46c7f082cac80174687f8ec7e39", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.36 [INFO] [stderr] Compiling syn v1.0.86 [INFO] [stderr] Compiling quote v1.0.15 [INFO] [stderr] Compiling thiserror-impl v1.0.30 [INFO] [stderr] Checking thiserror v1.0.30 [INFO] [stderr] Checking map-of-indexes v0.1.5-dev (/opt/rustwide/workdir) [INFO] [stdout] warning: #[should_panic] attribute without a reason [INFO] [stdout] --> src/lib.rs:424:5 [INFO] [stdout] | [INFO] [stdout] 424 | #[should_panic] [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider specifying the expected panic: `#[should_panic(expected = /* panic message */)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_panic_without_expect [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | #![warn(clippy::pedantic)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(clippy::should_panic_without_expect)]` implied by `#[warn(clippy::pedantic)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: #[should_panic] attribute without a reason [INFO] [stdout] --> src/lib.rs:431:5 [INFO] [stdout] | [INFO] [stdout] 431 | #[should_panic] [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider specifying the expected panic: `#[should_panic(expected = /* panic message */)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_panic_without_expect [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: long literal lacking separators [INFO] [stdout] --> src/lib.rs:448:65 [INFO] [stdout] | [INFO] [stdout] 448 | let mut map = MapOfIndexes::<(u32, u64)>::with_capacity(400000); [INFO] [stdout] | ^^^^^^ help: consider: `400_000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stdout] = note: `#[warn(clippy::unreadable_literal)]` implied by `#[warn(clippy::pedantic)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: long literal lacking separators [INFO] [stdout] --> src/lib.rs:449:21 [INFO] [stdout] | [INFO] [stdout] 449 | for i in 0..400000 { [INFO] [stdout] | ^^^^^^ help: consider: `400_000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: long literal lacking separators [INFO] [stdout] --> src/lib.rs:453:21 [INFO] [stdout] | [INFO] [stdout] 453 | for j in 0..400000 { [INFO] [stdout] | ^^^^^^ help: consider: `400_000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | !(std::mem::size_of::() * 8 < (KEY_NB_BITS + VALUE_NB_BITS).into()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(std::mem::size_of::() * 8 >= (KEY_NB_BITS + VALUE_NB_BITS).into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/lib.rs:353:6 [INFO] [stdout] | [INFO] [stdout] 353 | impl<'a, T: TryFrom + Ord + Copy, const KEY_NB_BITS: u8, const VALUE_NB_BITS: u8> KeyValue<'a> [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | #![warn(clippy::pedantic)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(clippy::elidable_lifetime_names)]` implied by `#[warn(clippy::pedantic)]` [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 353 - impl<'a, T: TryFrom + Ord + Copy, const KEY_NB_BITS: u8, const VALUE_NB_BITS: u8> KeyValue<'a> [INFO] [stdout] 353 + impl + Ord + Copy, const KEY_NB_BITS: u8, const VALUE_NB_BITS: u8> KeyValue<'_> [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/lib.rs:214:78 [INFO] [stdout] | [INFO] [stdout] 214 | pub fn get_element<'a>(&'a self, key: &>::K) -> Option<&T> { [INFO] [stdout] | -- -- ^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | the lifetime is named here the lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 214 | pub fn get_element<'a>(&'a self, key: &>::K) -> Option<&'a T> { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/lib.rs:219:91 [INFO] [stdout] | [INFO] [stdout] 219 | pub fn get_value<'a>(&'a self, key: &>::K) -> Option<>::V> { [INFO] [stdout] | -- the lifetime is named here -- the lifetime is named here ^^ the same lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 219 - pub fn get_value<'a>(&'a self, key: &>::K) -> Option<>::V> { [INFO] [stdout] 219 + pub fn get_value<'a>(&'a self, key: &>::K) -> Option<>::V> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/lib.rs:327:13 [INFO] [stdout] | [INFO] [stdout] 327 | !(std::mem::size_of::() * 8 < (KEY_NB_BITS + VALUE_NB_BITS).into()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(std::mem::size_of::() * 8 >= (KEY_NB_BITS + VALUE_NB_BITS).into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/lib.rs:353:6 [INFO] [stdout] | [INFO] [stdout] 353 | impl<'a, T: TryFrom + Ord + Copy, const KEY_NB_BITS: u8, const VALUE_NB_BITS: u8> KeyValue<'a> [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names [INFO] [stdout] = note: `#[warn(clippy::elidable_lifetime_names)]` implied by `#[warn(clippy::pedantic)]` [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 353 - impl<'a, T: TryFrom + Ord + Copy, const KEY_NB_BITS: u8, const VALUE_NB_BITS: u8> KeyValue<'a> [INFO] [stdout] 353 + impl + Ord + Copy, const KEY_NB_BITS: u8, const VALUE_NB_BITS: u8> KeyValue<'_> [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `i32` to `u8` may truncate the value [INFO] [stdout] --> src/lib.rs:391:60 [INFO] [stdout] | [INFO] [stdout] 391 | assert_eq!(s.get_value(&&i128::from(i)), Some(&(i as u8))); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: if this is intentional allow the lint with `#[allow(clippy::cast_possible_truncation)]` ... [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_possible_truncation [INFO] [stdout] = note: `#[warn(clippy::cast_possible_truncation)]` implied by `#[warn(clippy::pedantic)]` [INFO] [stdout] help: ... or use `try_from` and handle the error accordingly [INFO] [stdout] | [INFO] [stdout] 391 - assert_eq!(s.get_value(&&i128::from(i)), Some(&(i as u8))); [INFO] [stdout] 391 + assert_eq!(s.get_value(&&i128::from(i)), Some(&u8::try_from(i))); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `i32` to `u8` may lose the sign of the value [INFO] [stdout] --> src/lib.rs:391:60 [INFO] [stdout] | [INFO] [stdout] 391 | assert_eq!(s.get_value(&&i128::from(i)), Some(&(i as u8))); [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] = note: `#[warn(clippy::cast_sign_loss)]` implied by `#[warn(clippy::pedantic)]` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `i32` to `u32` may lose the sign of the value [INFO] [stdout] --> src/lib.rs:450:23 [INFO] [stdout] | [INFO] [stdout] 450 | map.push((i as u32, i as u64)) [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `i.cast_unsigned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `i32` to `u64` may lose the sign of the value [INFO] [stdout] --> src/lib.rs:450:33 [INFO] [stdout] | [INFO] [stdout] 450 | map.push((i as u32, i as u64)) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `i32` to `u32` may lose the sign of the value [INFO] [stdout] --> src/lib.rs:454:42 [INFO] [stdout] | [INFO] [stdout] 454 | assert_eq!(map.get_element(&&(j as u32)), Some(&(j as u32, j as u64))) [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `j.cast_unsigned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `i32` to `u32` may lose the sign of the value [INFO] [stdout] --> src/lib.rs:454:62 [INFO] [stdout] | [INFO] [stdout] 454 | assert_eq!(map.get_element(&&(j as u32)), Some(&(j as u32, j as u64))) [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, use `cast_unsigned()` instead: `j.cast_unsigned()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting `i32` to `u64` may lose the sign of the value [INFO] [stdout] --> src/lib.rs:454:72 [INFO] [stdout] | [INFO] [stdout] 454 | assert_eq!(map.get_element(&&(j as u32)), Some(&(j as u32, j as u64))) [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_sign_loss [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/lib.rs:214:78 [INFO] [stdout] | [INFO] [stdout] 214 | pub fn get_element<'a>(&'a self, key: &>::K) -> Option<&T> { [INFO] [stdout] | -- -- ^^ the same lifetime is elided here [INFO] [stdout] | | | [INFO] [stdout] | the lifetime is named here the lifetime is named here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 214 | pub fn get_element<'a>(&'a self, key: &>::K) -> Option<&'a T> { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: eliding a lifetime that's named elsewhere is confusing [INFO] [stdout] --> src/lib.rs:219:91 [INFO] [stdout] | [INFO] [stdout] 219 | pub fn get_value<'a>(&'a self, key: &>::K) -> Option<>::V> { [INFO] [stdout] | -- the lifetime is named here -- the lifetime is named here ^^ the same lifetime is elided here [INFO] [stdout] | [INFO] [stdout] = help: the same lifetime is referred to in inconsistent ways, making the signature confusing [INFO] [stdout] help: consistently use `'a` [INFO] [stdout] | [INFO] [stdout] 219 - pub fn get_value<'a>(&'a self, key: &>::K) -> Option<>::V> { [INFO] [stdout] 219 + pub fn get_value<'a>(&'a self, key: &>::K) -> Option<>::V> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 5.88s [INFO] running `Command { std: "docker" "inspect" "9fe30c02e62cf3dd2dfbbc293c4ebe8ba909a46c7f082cac80174687f8ec7e39", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9fe30c02e62cf3dd2dfbbc293c4ebe8ba909a46c7f082cac80174687f8ec7e39", kill_on_drop: false }` [INFO] [stdout] 9fe30c02e62cf3dd2dfbbc293c4ebe8ba909a46c7f082cac80174687f8ec7e39