[INFO] crate generic-array 0.12.0 is already in cache [INFO] extracting crate generic-array 0.12.0 into work/ex/clippy-test-run/sources/stable/reg/generic-array/0.12.0 [INFO] extracting crate generic-array 0.12.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/generic-array/0.12.0 [INFO] validating manifest of generic-array-0.12.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 generic-array-0.12.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 generic-array-0.12.0 [INFO] finished frobbing generic-array-0.12.0 [INFO] frobbed toml for generic-array-0.12.0 written to work/ex/clippy-test-run/sources/stable/reg/generic-array/0.12.0/Cargo.toml [INFO] started frobbing generic-array-0.12.0 [INFO] finished frobbing generic-array-0.12.0 [INFO] frobbed toml for generic-array-0.12.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/generic-array/0.12.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 generic-array-0.12.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/generic-array/0.12.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] ba95c295ad22b29ec8e8eaf96f5cce18644f5a6dd553d42045dc1661e60454ab [INFO] running `"docker" "start" "-a" "ba95c295ad22b29ec8e8eaf96f5cce18644f5a6dd553d42045dc1661e60454ab"` [INFO] [stderr] Checking generic-array v0.12.0 (/opt/crater/workdir) [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sequence.rs:224:33 [INFO] [stderr] | [INFO] [stderr] 224 | let last_ptr = unsafe { init_ptr.offset(Sub1::::to_usize() as isize) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `init_ptr.add(Sub1::::to_usize())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_offset_with_cast)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sequence.rs:273:33 [INFO] [stderr] | [INFO] [stderr] 273 | let tail_ptr = unsafe { head_ptr.offset(K::to_usize() as isize) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `head_ptr.add(K::to_usize())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sequence.rs:315:24 [INFO] [stderr] | [INFO] [stderr] 315 | ptr::write(output_ptr.offset(N::to_usize() as isize) as *mut _, rest); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `output_ptr.add(N::to_usize())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/lib.rs:573:60 [INFO] [stderr] | [INFO] [stderr] 573 | for (dst, src) in destination_iter.zip(iter.into_iter()) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> tests/iter.rs:109:13 [INFO] [stderr] | [INFO] [stderr] 109 | i: i [INFO] [stderr] | ^^^^ help: replace it with: `i` [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: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sequence.rs:224:33 [INFO] [stderr] | [INFO] [stderr] 224 | let last_ptr = unsafe { init_ptr.offset(Sub1::::to_usize() as isize) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `init_ptr.add(Sub1::::to_usize())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_offset_with_cast)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sequence.rs:273:33 [INFO] [stderr] | [INFO] [stderr] 273 | let tail_ptr = unsafe { head_ptr.offset(K::to_usize() as isize) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `head_ptr.add(K::to_usize())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/sequence.rs:315:24 [INFO] [stderr] | [INFO] [stderr] 315 | ptr::write(output_ptr.offset(N::to_usize() as isize) as *mut _, rest); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `output_ptr.add(N::to_usize())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/lib.rs:573:60 [INFO] [stderr] | [INFO] [stderr] 573 | for (dst, src) in destination_iter.zip(iter.into_iter()) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: consider removing `.into_iter()`: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> tests/iter.rs:63:20 [INFO] [stderr] | [INFO] [stderr] 63 | assert_eq!(v.clone().into_iter().nth(i).unwrap(), v[i]); [INFO] [stderr] | ^^^^^^^^^ help: try removing the `clone` call: `v` [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: using `clone` on a `Copy` type [INFO] [stderr] --> tests/iter.rs:65:16 [INFO] [stderr] | [INFO] [stderr] 65 | assert_eq!(v.clone().into_iter().nth(v.len()), None); [INFO] [stderr] | ^^^^^^^^^ help: try removing the `clone` call: `v` [INFO] [stderr] | [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: using `clone` on a `Copy` type [INFO] [stderr] --> tests/iter.rs:82:16 [INFO] [stderr] | [INFO] [stderr] 82 | assert_eq!(v.clone().into_iter().count(), 5); [INFO] [stderr] | ^^^^^^^^^ help: try removing the `clone` call: `v` [INFO] [stderr] | [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: in an 'if' condition, avoid complex blocks or closures with blocks; instead, move the block or closure higher and bind it with a 'let' [INFO] [stderr] --> tests/iter.rs:92:33 [INFO] [stderr] | [INFO] [stderr] 92 | assert!((0..5).flat_map(|i| arr![i32; 2 * i, 2 * i + 1]).eq(0..10)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::block_in_if_condition_stmt)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#block_in_if_condition_stmt [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: the loop variable `i` is used to index `list97` [INFO] [stderr] --> tests/mod.rs:15:14 [INFO] [stderr] | [INFO] [stderr] 15 | for i in 0..97 { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 15 | for (i, ) in list97.iter_mut().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly [INFO] [stderr] --> tests/mod.rs:104:25 [INFO] [stderr] | [INFO] [stderr] 104 | let arr = arr![f32; 3.14]; [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::approx_constant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant [INFO] [stderr] [INFO] [stderr] error: approximate value of `f{32, 64}::consts::PI` found. Consider using it directly [INFO] [stderr] --> tests/mod.rs:105:24 [INFO] [stderr] | [INFO] [stderr] 105 | assert_eq!(arr[0], 3.14); [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> tests/mod.rs:105:5 [INFO] [stderr] | [INFO] [stderr] 105 | assert_eq!(arr[0], 3.14); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::float_cmp)] on by default [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> tests/mod.rs:105:5 [INFO] [stderr] | [INFO] [stderr] 105 | assert_eq!(arr[0], 3.14); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [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: the operation is ineffective. Consider reducing it to `size_of::()` [INFO] [stderr] --> tests/mod.rs:197:44 [INFO] [stderr] | [INFO] [stderr] 197 | assert_eq!(size_of_val(&arr![u32; 1]), size_of::() * 1); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_op)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stderr] [INFO] [stderr] error: aborting due to 3 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `generic-array`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "ba95c295ad22b29ec8e8eaf96f5cce18644f5a6dd553d42045dc1661e60454ab"` [INFO] running `"docker" "rm" "-f" "ba95c295ad22b29ec8e8eaf96f5cce18644f5a6dd553d42045dc1661e60454ab"` [INFO] [stdout] ba95c295ad22b29ec8e8eaf96f5cce18644f5a6dd553d42045dc1661e60454ab