[INFO] fetching crate slow_primes 0.1.14... [INFO] linting slow_primes-0.1.14 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate slow_primes 0.1.14 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate slow_primes 0.1.14 [INFO] finished tweaking crates.io crate slow_primes 0.1.14 [INFO] tweaked toml for crates.io crate slow_primes 0.1.14 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate slow_primes 0.1.14 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 8 packages to latest compatible versions [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] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 49f07d4b25834cdce5dbafd2d76c20dc4326145ce053df7dbbc50593cd4d4f6b [INFO] running `Command { std: "docker" "start" "-a" "49f07d4b25834cdce5dbafd2d76c20dc4326145ce053df7dbbc50593cd4d4f6b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "49f07d4b25834cdce5dbafd2d76c20dc4326145ce053df7dbbc50593cd4d4f6b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "49f07d4b25834cdce5dbafd2d76c20dc4326145ce053df7dbbc50593cd4d4f6b", kill_on_drop: false }` [INFO] [stdout] 49f07d4b25834cdce5dbafd2d76c20dc4326145ce053df7dbbc50593cd4d4f6b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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] 6018c3aa0346c7ded6d63bea3119d3b2c1d6d1188eebf65b55906077bbd9b8d9 [INFO] running `Command { std: "docker" "start" "-a" "6018c3aa0346c7ded6d63bea3119d3b2c1d6d1188eebf65b55906077bbd9b8d9", kill_on_drop: false }` [INFO] [stderr] warning: `package.edition` is unspecified, defaulting to `2015` while the latest is `2024` [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking slow_primes v0.1.14 (/opt/rustwide/workdir) [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/bit.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | !0 >> (32 - bits % 32) % 32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `!0 >> ((32 - bits % 32) % 32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | nbits: nbits [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `nbits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:915:13 [INFO] [stdout] | [INFO] [stdout] 915 | try!(write!(fmt, "{}", if bit { 1 } else { 0 })); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1107:18 [INFO] [stdout] | [INFO] [stdout] 1107 | BitSet { bit_vec: bit_vec } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `bit_vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1313:13 [INFO] [stdout] | [INFO] [stdout] 1313 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1342:13 [INFO] [stdout] | [INFO] [stdout] 1342 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1378:13 [INFO] [stdout] | [INFO] [stdout] 1378 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1408:13 [INFO] [stdout] | [INFO] [stdout] 1408 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:1600:9 [INFO] [stdout] | [INFO] [stdout] 1600 | try!(write!(fmt, "{{")); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:1606:13 [INFO] [stdout] | [INFO] [stdout] 1606 | try!(write!(fmt, "{:?}", n)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:1604:17 [INFO] [stdout] | [INFO] [stdout] 1604 | try!(write!(fmt, ", ")); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | small: small, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `small` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | low: low, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `low` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | current: current, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | limit: limit [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/is_prime.rs:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | const HINT: &'static [u64] = &[2]; [INFO] [stdout] | -^^^^^^^------ help: consider removing `'static`: `&[u64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/is_prime.rs:32:23 [INFO] [stdout] | [INFO] [stdout] 32 | const WITNESSES: &'static [(u64, &'static [u64])] = [INFO] [stdout] | -^^^^^^^------------------------ help: consider removing `'static`: `&[(u64, &'static [u64])]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/is_prime.rs:32:39 [INFO] [stdout] | [INFO] [stdout] 32 | const WITNESSES: &'static [(u64, &'static [u64])] = [INFO] [stdout] | -^^^^^^^------ help: consider removing `'static`: `&[u64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/bit.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | !0 >> (32 - bits % 32) % 32 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `!0 >> ((32 - bits % 32) % 32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:261:13 [INFO] [stdout] | [INFO] [stdout] 261 | nbits: nbits [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `nbits` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:915:13 [INFO] [stdout] | [INFO] [stdout] 915 | try!(write!(fmt, "{}", if bit { 1 } else { 0 })); [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(deprecated)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1107:18 [INFO] [stdout] | [INFO] [stdout] 1107 | BitSet { bit_vec: bit_vec } [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `bit_vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1313:13 [INFO] [stdout] | [INFO] [stdout] 1313 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1342:13 [INFO] [stdout] | [INFO] [stdout] 1342 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1378:13 [INFO] [stdout] | [INFO] [stdout] 1378 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/bit.rs:1408:13 [INFO] [stdout] | [INFO] [stdout] 1408 | other: other, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `other` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:1600:9 [INFO] [stdout] | [INFO] [stdout] 1600 | try!(write!(fmt, "{{")); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:1606:13 [INFO] [stdout] | [INFO] [stdout] 1606 | try!(write!(fmt, "{:?}", n)); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of deprecated macro `try`: use the `?` operator instead [INFO] [stdout] --> src/bit.rs:1604:17 [INFO] [stdout] | [INFO] [stdout] 1604 | try!(write!(fmt, ", ")); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:40:13 [INFO] [stdout] | [INFO] [stdout] 40 | small: small, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `small` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:44:13 [INFO] [stdout] | [INFO] [stdout] 44 | low: low, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `low` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | current: current, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `current` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/fast_sieve.rs:46:13 [INFO] [stdout] | [INFO] [stdout] 46 | limit: limit [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `limit` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/is_prime.rs:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | const HINT: &'static [u64] = &[2]; [INFO] [stdout] | -^^^^^^^------ help: consider removing `'static`: `&[u64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/is_prime.rs:32:23 [INFO] [stdout] | [INFO] [stdout] 32 | const WITNESSES: &'static [(u64, &'static [u64])] = [INFO] [stdout] | -^^^^^^^------------------------ help: consider removing `'static`: `&[(u64, &'static [u64])]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/is_prime.rs:32:39 [INFO] [stdout] | [INFO] [stdout] 32 | const WITNESSES: &'static [(u64, &'static [u64])] = [INFO] [stdout] | -^^^^^^^------ help: consider removing `'static`: `&[u64]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses [INFO] [stdout] --> src/perfect_power.rs:106:43 [INFO] [stdout] | [INFO] [stdout] 106 | if is_prime { Some((expected))} else { None }) [INFO] [stdout] | ^^^^^^^^^^ help: remove them: `expected` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_parens [INFO] [stdout] = note: `#[warn(clippy::double_parens)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around function argument [INFO] [stdout] --> src/perfect_power.rs:106:43 [INFO] [stdout] | [INFO] [stdout] 106 | if is_prime { Some((expected))} else { None }) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 106 - if is_prime { Some((expected))} else { None }) [INFO] [stdout] 106 + if is_prime { Some(expected )} else { None }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> src/perfect_power.rs:123:26 [INFO] [stdout] | [INFO] [stdout] 123 | for n in (1..MAX.log(pq as f64) as u32) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 123 - for n in (1..MAX.log(pq as f64) as u32) { [INFO] [stdout] 123 + for n in 1..MAX.log(pq as f64) as u32 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/bit.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:183:8 [INFO] [stdout] | [INFO] [stdout] 183 | if bits % 32 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `bits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bit.rs:260:22 [INFO] [stdout] | [INFO] [stdout] 260 | storage: repeat(if bit { !0 } else { 0 }).take(nblocks).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(if bit { !0 } else { 0 }, nblocks)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bit.rs:306:17 [INFO] [stdout] | [INFO] [stdout] 306 | ((reverse_bits(bytes[i * 4 + 0]) as u32) << 0) | [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((reverse_bits(bytes[i * 4 + 0]) as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bit.rs:306:38 [INFO] [stdout] | [INFO] [stdout] 306 | ((reverse_bits(bytes[i * 4 + 0]) as u32) << 0) | [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `(i * 4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:647:22 [INFO] [stdout] | [INFO] [stdout] 647 | if self.nbits % 8 == 0 { 0 } else { 1 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `self.nbits.is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:782:12 [INFO] [stdout] | [INFO] [stdout] 782 | if self.nbits % 32 > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!self.nbits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bit.rs:800:33 [INFO] [stdout] | [INFO] [stdout] 800 | self.storage.extend(repeat(full_value).take(to_add)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(full_value, to_add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:830:16 [INFO] [stdout] | [INFO] [stdout] 830 | if self.nbits % 32 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.nbits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:851:12 [INFO] [stdout] | [INFO] [stdout] 851 | if self.nbits % 32 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.nbits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `cloned` [INFO] [stdout] --> src/bit.rs:924:21 [INFO] [stdout] | [INFO] [stdout] 924 | for elem in self.storage.iter().cloned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 924 - for elem in self.storage.iter().cloned() { [INFO] [stdout] 924 + for elem in self.storage.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1582:9 [INFO] [stdout] | [INFO] [stdout] 1582 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1582 - return true; [INFO] [stdout] 1582 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1594:9 [INFO] [stdout] | [INFO] [stdout] 1594 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1594 - return true; [INFO] [stdout] 1594 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1660:9 [INFO] [stdout] | [INFO] [stdout] 1660 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1660 - return None; [INFO] [stdout] 1660 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1696:9 [INFO] [stdout] | [INFO] [stdout] 1696 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1696 - return None; [INFO] [stdout] 1696 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/fast_sieve.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / pub fn next(&mut self) -> Option<(usize, &BitVec)> { [INFO] [stdout] 60 | | if self.low >= self.limit { [INFO] [stdout] 61 | | return None [INFO] [stdout] ... | [INFO] [stdout] 99 | | Some((low, &self.sieve)) [INFO] [stdout] 100 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/is_prime.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | if n % 2 == 0 { return n == 2 } [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/is_prime.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | while d % 2 == 0 { d /= 2; s += 1 } [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `d.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/perfect_power.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | let floor_log_2 = 64 - x.leading_zeros() as u32 - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.leading_zeros()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/sieve.rs:48:46 [INFO] [stdout] | [INFO] [stdout] 48 | let mut is_prime = BitVec::from_elem((limit + 1) / 2, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `limit.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/sieve.rs:81:12 [INFO] [stdout] | [INFO] [stdout] 81 | if n % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/sieve.rs:124:19 [INFO] [stdout] | [INFO] [stdout] 124 | while n % p == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/bit.rs:215:19 [INFO] [stdout] | [INFO] [stdout] 215 | fn blocks_mut(&mut self) -> MutBlocks { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided 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: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 215 | fn blocks_mut(&mut self) -> MutBlocks<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/bit.rs:576:17 [INFO] [stdout] | [INFO] [stdout] 576 | pub fn iter(&self) -> Iter { [INFO] [stdout] | ^^^^^ ^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the 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: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 576 | pub fn iter(&self) -> Iter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/bit.rs:1287:17 [INFO] [stdout] | [INFO] [stdout] 1287 | pub fn iter(&self) -> SetIter { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the 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: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1287 | pub fn iter(&self) -> SetIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/bit.rs:90:5 [INFO] [stdout] | [INFO] [stdout] 90 | use std::usize; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `usize::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:183:8 [INFO] [stdout] | [INFO] [stdout] 183 | if bits % 32 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace with: `bits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bit.rs:260:22 [INFO] [stdout] | [INFO] [stdout] 260 | storage: repeat(if bit { !0 } else { 0 }).take(nblocks).collect(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(if bit { !0 } else { 0 }, nblocks)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bit.rs:306:17 [INFO] [stdout] | [INFO] [stdout] 306 | ((reverse_bits(bytes[i * 4 + 0]) as u32) << 0) | [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((reverse_bits(bytes[i * 4 + 0]) as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/bit.rs:306:38 [INFO] [stdout] | [INFO] [stdout] 306 | ((reverse_bits(bytes[i * 4 + 0]) as u32) << 0) | [INFO] [stdout] | ^^^^^^^^^ help: consider reducing it to: `(i * 4)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:647:22 [INFO] [stdout] | [INFO] [stdout] 647 | if self.nbits % 8 == 0 { 0 } else { 1 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `self.nbits.is_multiple_of(8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:782:12 [INFO] [stdout] | [INFO] [stdout] 782 | if self.nbits % 32 > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: replace with: `!self.nbits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/bit.rs:800:33 [INFO] [stdout] | [INFO] [stdout] 800 | self.storage.extend(repeat(full_value).take(to_add)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(full_value, to_add)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:830:16 [INFO] [stdout] | [INFO] [stdout] 830 | if self.nbits % 32 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.nbits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/bit.rs:851:12 [INFO] [stdout] | [INFO] [stdout] 851 | if self.nbits % 32 == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.nbits.is_multiple_of(32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `cloned` [INFO] [stdout] --> src/bit.rs:924:21 [INFO] [stdout] | [INFO] [stdout] 924 | for elem in self.storage.iter().cloned() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] help: remove any references to the binding [INFO] [stdout] | [INFO] [stdout] 924 - for elem in self.storage.iter().cloned() { [INFO] [stdout] 924 + for elem in self.storage.iter() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1582:9 [INFO] [stdout] | [INFO] [stdout] 1582 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1582 - return true; [INFO] [stdout] 1582 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1594:9 [INFO] [stdout] | [INFO] [stdout] 1594 | return true; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1594 - return true; [INFO] [stdout] 1594 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1660:9 [INFO] [stdout] | [INFO] [stdout] 1660 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1660 - return None; [INFO] [stdout] 1660 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/bit.rs:1696:9 [INFO] [stdout] | [INFO] [stdout] 1696 | return None; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 1696 - return None; [INFO] [stdout] 1696 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `next` can be confused for the standard trait method `std::iter::Iterator::next` [INFO] [stdout] --> src/fast_sieve.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | / pub fn next(&mut self) -> Option<(usize, &BitVec)> { [INFO] [stdout] 60 | | if self.low >= self.limit { [INFO] [stdout] 61 | | return None [INFO] [stdout] ... | [INFO] [stdout] 99 | | Some((low, &self.sieve)) [INFO] [stdout] 100 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::iter::Iterator` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/fast_sieve.rs:115:25 [INFO] [stdout] | [INFO] [stdout] 115 | assert!(primes.is_prime(i) == !next[(i - low) / 2], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `primes.is_prime(i) != next[(i - low) / 2]` [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: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/is_prime.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | if n % 2 == 0 { return n == 2 } [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/is_prime.rs:50:11 [INFO] [stdout] | [INFO] [stdout] 50 | while d % 2 == 0 { d /= 2; s += 1 } [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `d.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u32` -> `u32`) [INFO] [stdout] --> src/perfect_power.rs:35:28 [INFO] [stdout] | [INFO] [stdout] 35 | let floor_log_2 = 64 - x.leading_zeros() as u32 - 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `x.leading_zeros()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/perfect_power.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | / loop { [INFO] [stdout] 114 | | let p = match primes.next() { [INFO] [stdout] 115 | | Some(p) => p as u64, [INFO] [stdout] 116 | | None => break [INFO] [stdout] ... | [INFO] [stdout] 132 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 113 ~ while let Some(p) = primes.next() { [INFO] [stdout] 114 + let p = p as u64; [INFO] [stdout] 115 + .. [INFO] [stdout] 116 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/sieve.rs:48:46 [INFO] [stdout] | [INFO] [stdout] 48 | let mut is_prime = BitVec::from_elem((limit + 1) / 2, false); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `limit.div_ceil(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/sieve.rs:81:12 [INFO] [stdout] | [INFO] [stdout] 81 | if n % 2 == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(2)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/sieve.rs:124:19 [INFO] [stdout] | [INFO] [stdout] 124 | while n % p == 0 { [INFO] [stdout] | ^^^^^^^^^^ help: replace with: `n.is_multiple_of(p)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/bit.rs:215:19 [INFO] [stdout] | [INFO] [stdout] 215 | fn blocks_mut(&mut self) -> MutBlocks { [INFO] [stdout] | ^^^^^^^^^ ^^^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the lifetime is elided 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: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 215 | fn blocks_mut(&mut self) -> MutBlocks<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/bit.rs:576:17 [INFO] [stdout] | [INFO] [stdout] 576 | pub fn iter(&self) -> Iter { [INFO] [stdout] | ^^^^^ ^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the 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: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 576 | pub fn iter(&self) -> Iter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: hiding a lifetime that's elided elsewhere is confusing [INFO] [stdout] --> src/bit.rs:1287:17 [INFO] [stdout] | [INFO] [stdout] 1287 | pub fn iter(&self) -> SetIter { [INFO] [stdout] | ^^^^^ ^^^^^^^ the same lifetime is hidden here [INFO] [stdout] | | [INFO] [stdout] | the 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: use `'_` for type paths [INFO] [stdout] | [INFO] [stdout] 1287 | pub fn iter(&self) -> SetIter<'_> { [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `for` iterator expression [INFO] [stdout] --> examples/small_prime_props.rs:54:18 [INFO] [stdout] | [INFO] [stdout] 54 | for _ in (last..p) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 54 - for _ in (last..p) { [INFO] [stdout] 54 + for _ in last..p { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.61s [INFO] running `Command { std: "docker" "inspect" "6018c3aa0346c7ded6d63bea3119d3b2c1d6d1188eebf65b55906077bbd9b8d9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6018c3aa0346c7ded6d63bea3119d3b2c1d6d1188eebf65b55906077bbd9b8d9", kill_on_drop: false }` [INFO] [stdout] 6018c3aa0346c7ded6d63bea3119d3b2c1d6d1188eebf65b55906077bbd9b8d9