[INFO] updating cached repository woshilapin/game-of-life [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/woshilapin/game-of-life [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/woshilapin/game-of-life" "work/ex/clippy-test-run/sources/stable/gh/woshilapin/game-of-life"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/woshilapin/game-of-life'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/woshilapin/game-of-life" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/woshilapin/game-of-life"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/woshilapin/game-of-life'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 2fb1391d0432be74404a659a223e3561174b1941 [INFO] sha for GitHub repo woshilapin/game-of-life: 2fb1391d0432be74404a659a223e3561174b1941 [INFO] validating manifest of woshilapin/game-of-life 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 woshilapin/game-of-life 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 woshilapin/game-of-life [INFO] finished frobbing woshilapin/game-of-life [INFO] frobbed toml for woshilapin/game-of-life written to work/ex/clippy-test-run/sources/stable/gh/woshilapin/game-of-life/Cargo.toml [INFO] started frobbing woshilapin/game-of-life [INFO] finished frobbing woshilapin/game-of-life [INFO] frobbed toml for woshilapin/game-of-life written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/woshilapin/game-of-life/Cargo.toml [INFO] crate woshilapin/game-of-life has a lockfile. skipping [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 woshilapin/game-of-life against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/woshilapin/game-of-life:/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] c0b98b816dad02af0133a21e7de6b52c02681d0f14508bc77be8a4e612d8ba90 [INFO] running `"docker" "start" "-a" "c0b98b816dad02af0133a21e7de6b52c02681d0f14508bc77be8a4e612d8ba90"` [INFO] [stderr] Checking game-of-life v0.1.0 (/opt/crater/workdir) [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:9:18 [INFO] [stderr] | [INFO] [stderr] 9 | if y > 0 && *array.offset(((y-1) * width + x) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::not_unsafe_ptr_arg_deref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:13:35 [INFO] [stderr] | [INFO] [stderr] 13 | if y > 0 && x < width - 1 && *array.offset(((y-1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:17:26 [INFO] [stderr] | [INFO] [stderr] 17 | if x < width - 1 && *array.offset((y * width + x + 1) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:21:44 [INFO] [stderr] | [INFO] [stderr] 21 | if y < height - 1 && x < width - 1 && *array.offset(((y+1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:25:27 [INFO] [stderr] | [INFO] [stderr] 25 | if y < height - 1 && *array.offset(((y+1) * width + x) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:29:36 [INFO] [stderr] | [INFO] [stderr] 29 | if y < height - 1 && x > 0 && *array.offset(((y+1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:33:18 [INFO] [stderr] | [INFO] [stderr] 33 | if x > 0 && *array.offset((y * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:37:27 [INFO] [stderr] | [INFO] [stderr] 37 | if y > 0 && x > 0 && *array.offset(((y-1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | if *array.offset((y * width + x) as isize) && living_neighbours >= 2 && living_neighbours <= 3 { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:43:17 [INFO] [stderr] | [INFO] [stderr] 43 | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:51:5 [INFO] [stderr] | [INFO] [stderr] 51 | *array.offset(index as isize) = vec_array[index]; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:9:18 [INFO] [stderr] | [INFO] [stderr] 9 | if y > 0 && *array.offset(((y-1) * width + x) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y-1) * width + x))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:10:6 [INFO] [stderr] | [INFO] [stderr] 10 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:13:35 [INFO] [stderr] | [INFO] [stderr] 13 | if y > 0 && x < width - 1 && *array.offset(((y-1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y-1) * width + (x+1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:14:6 [INFO] [stderr] | [INFO] [stderr] 14 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:17:26 [INFO] [stderr] | [INFO] [stderr] 17 | if x < width - 1 && *array.offset((y * width + x + 1) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + x + 1))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:18:6 [INFO] [stderr] | [INFO] [stderr] 18 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:21:44 [INFO] [stderr] | [INFO] [stderr] 21 | if y < height - 1 && x < width - 1 && *array.offset(((y+1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y+1) * width + (x+1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:22:6 [INFO] [stderr] | [INFO] [stderr] 22 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:25:27 [INFO] [stderr] | [INFO] [stderr] 25 | if y < height - 1 && *array.offset(((y+1) * width + x) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y+1) * width + x))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:26:6 [INFO] [stderr] | [INFO] [stderr] 26 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:29:36 [INFO] [stderr] | [INFO] [stderr] 29 | if y < height - 1 && x > 0 && *array.offset(((y+1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y+1) * width + (x-1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:30:6 [INFO] [stderr] | [INFO] [stderr] 30 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:33:18 [INFO] [stderr] | [INFO] [stderr] 33 | if x > 0 && *array.offset((y * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + (x-1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:34:6 [INFO] [stderr] | [INFO] [stderr] 34 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:37:27 [INFO] [stderr] | [INFO] [stderr] 37 | if y > 0 && x > 0 && *array.offset(((y-1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y-1) * width + (x-1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:38:6 [INFO] [stderr] | [INFO] [stderr] 38 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/main.rs:43:82 [INFO] [stderr] | [INFO] [stderr] 43 | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | ______________________________________________________________________________________________^ [INFO] [stderr] 44 | | vec_array[y*width + x] = true; [INFO] [stderr] 45 | | } else { [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/main.rs:41:100 [INFO] [stderr] | [INFO] [stderr] 41 | if *array.offset((y * width + x) as isize) && living_neighbours >= 2 && living_neighbours <= 3 { [INFO] [stderr] | ________________________________________________________________________________________________________________^ [INFO] [stderr] 42 | | vec_array[y*width + x] = true; [INFO] [stderr] 43 | | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | |_________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | if *array.offset((y * width + x) as isize) && living_neighbours >= 2 && living_neighbours <= 3 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + x))` [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/main.rs:43:17 [INFO] [stderr] | [INFO] [stderr] 43 | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + x))` [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: the loop variable `index` is used to index `vec_array` [INFO] [stderr] --> src/main.rs:50:16 [INFO] [stderr] | [INFO] [stderr] 50 | for index in 0..(width*height) { [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] 50 | for (index, ) in vec_array.iter().enumerate().take((width*height)) { [INFO] [stderr] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:51:5 [INFO] [stderr] | [INFO] [stderr] 51 | *array.offset(index as isize) = vec_array[index]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(index)` [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] error: aborting due to 12 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `game-of-life`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:9:18 [INFO] [stderr] | [INFO] [stderr] 9 | if y > 0 && *array.offset(((y-1) * width + x) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::not_unsafe_ptr_arg_deref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:13:35 [INFO] [stderr] | [INFO] [stderr] 13 | if y > 0 && x < width - 1 && *array.offset(((y-1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:17:26 [INFO] [stderr] | [INFO] [stderr] 17 | if x < width - 1 && *array.offset((y * width + x + 1) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:21:44 [INFO] [stderr] | [INFO] [stderr] 21 | if y < height - 1 && x < width - 1 && *array.offset(((y+1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:25:27 [INFO] [stderr] | [INFO] [stderr] 25 | if y < height - 1 && *array.offset(((y+1) * width + x) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:29:36 [INFO] [stderr] | [INFO] [stderr] 29 | if y < height - 1 && x > 0 && *array.offset(((y+1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:33:18 [INFO] [stderr] | [INFO] [stderr] 33 | if x > 0 && *array.offset((y * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:37:27 [INFO] [stderr] | [INFO] [stderr] 37 | if y > 0 && x > 0 && *array.offset(((y-1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | if *array.offset((y * width + x) as isize) && living_neighbours >= 2 && living_neighbours <= 3 { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:43:17 [INFO] [stderr] | [INFO] [stderr] 43 | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] error: this public function dereferences a raw pointer but is not marked `unsafe` [INFO] [stderr] --> src/main.rs:51:5 [INFO] [stderr] | [INFO] [stderr] 51 | *array.offset(index as isize) = vec_array[index]; [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#not_unsafe_ptr_arg_deref [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:9:18 [INFO] [stderr] | [INFO] [stderr] 9 | if y > 0 && *array.offset(((y-1) * width + x) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y-1) * width + x))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:10:6 [INFO] [stderr] | [INFO] [stderr] 10 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:13:35 [INFO] [stderr] | [INFO] [stderr] 13 | if y > 0 && x < width - 1 && *array.offset(((y-1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y-1) * width + (x+1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:14:6 [INFO] [stderr] | [INFO] [stderr] 14 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:17:26 [INFO] [stderr] | [INFO] [stderr] 17 | if x < width - 1 && *array.offset((y * width + x + 1) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + x + 1))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:18:6 [INFO] [stderr] | [INFO] [stderr] 18 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:21:44 [INFO] [stderr] | [INFO] [stderr] 21 | if y < height - 1 && x < width - 1 && *array.offset(((y+1) * width + (x+1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y+1) * width + (x+1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:22:6 [INFO] [stderr] | [INFO] [stderr] 22 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:25:27 [INFO] [stderr] | [INFO] [stderr] 25 | if y < height - 1 && *array.offset(((y+1) * width + x) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y+1) * width + x))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:26:6 [INFO] [stderr] | [INFO] [stderr] 26 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:29:36 [INFO] [stderr] | [INFO] [stderr] 29 | if y < height - 1 && x > 0 && *array.offset(((y+1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y+1) * width + (x-1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:30:6 [INFO] [stderr] | [INFO] [stderr] 30 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:33:18 [INFO] [stderr] | [INFO] [stderr] 33 | if x > 0 && *array.offset((y * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + (x-1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:34:6 [INFO] [stderr] | [INFO] [stderr] 34 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:37:27 [INFO] [stderr] | [INFO] [stderr] 37 | if y > 0 && x > 0 && *array.offset(((y-1) * width + (x-1)) as isize) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(((y-1) * width + (x-1)))` [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: manual implementation of an assign operation [INFO] [stderr] --> src/main.rs:38:6 [INFO] [stderr] | [INFO] [stderr] 38 | living_neighbours = living_neighbours + 1; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `living_neighbours += 1` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/main.rs:43:82 [INFO] [stderr] | [INFO] [stderr] 43 | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | ______________________________________________________________________________________________^ [INFO] [stderr] 44 | | vec_array[y*width + x] = true; [INFO] [stderr] 45 | | } else { [INFO] [stderr] | |_________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/main.rs:41:100 [INFO] [stderr] | [INFO] [stderr] 41 | if *array.offset((y * width + x) as isize) && living_neighbours >= 2 && living_neighbours <= 3 { [INFO] [stderr] | ________________________________________________________________________________________________________________^ [INFO] [stderr] 42 | | vec_array[y*width + x] = true; [INFO] [stderr] 43 | | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | |_________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:41:9 [INFO] [stderr] | [INFO] [stderr] 41 | if *array.offset((y * width + x) as isize) && living_neighbours >= 2 && living_neighbours <= 3 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + x))` [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/main.rs:43:17 [INFO] [stderr] | [INFO] [stderr] 43 | } else if !*array.offset((y * width + x) as isize) && living_neighbours == 3 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add((y * width + x))` [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: the loop variable `index` is used to index `vec_array` [INFO] [stderr] --> src/main.rs:50:16 [INFO] [stderr] | [INFO] [stderr] 50 | for index in 0..(width*height) { [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] 50 | for (index, ) in vec_array.iter().enumerate().take((width*height)) { [INFO] [stderr] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stderr] --> src/main.rs:51:5 [INFO] [stderr] | [INFO] [stderr] 51 | *array.offset(index as isize) = vec_array[index]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `array.add(index)` [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] error: aborting due to 12 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `game-of-life`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "c0b98b816dad02af0133a21e7de6b52c02681d0f14508bc77be8a4e612d8ba90"` [INFO] running `"docker" "rm" "-f" "c0b98b816dad02af0133a21e7de6b52c02681d0f14508bc77be8a4e612d8ba90"` [INFO] [stdout] c0b98b816dad02af0133a21e7de6b52c02681d0f14508bc77be8a4e612d8ba90