[INFO] updating cached repository smarion2/Hal-Ai [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/smarion2/Hal-Ai [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/smarion2/Hal-Ai" "work/ex/clippy-test-run/sources/stable/gh/smarion2/Hal-Ai"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/smarion2/Hal-Ai'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/smarion2/Hal-Ai" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/smarion2/Hal-Ai"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/smarion2/Hal-Ai'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] d4af0edcc5786e911398844b5a1c56585904285b [INFO] sha for GitHub repo smarion2/Hal-Ai: d4af0edcc5786e911398844b5a1c56585904285b [INFO] validating manifest of smarion2/Hal-Ai 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 smarion2/Hal-Ai 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 smarion2/Hal-Ai [INFO] finished frobbing smarion2/Hal-Ai [INFO] frobbed toml for smarion2/Hal-Ai written to work/ex/clippy-test-run/sources/stable/gh/smarion2/Hal-Ai/Cargo.toml [INFO] started frobbing smarion2/Hal-Ai [INFO] finished frobbing smarion2/Hal-Ai [INFO] frobbed toml for smarion2/Hal-Ai written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/smarion2/Hal-Ai/Cargo.toml [INFO] crate smarion2/Hal-Ai 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 smarion2/Hal-Ai against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/smarion2/Hal-Ai:/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 -Dclippy::into_iter_on_array" "-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] 34f677f79b7bc6f3695649ae051bc7eadb69ed1058adbb3342113c1a35a228c1 [INFO] running `"docker" "start" "-a" "34f677f79b7bc6f3695649ae051bc7eadb69ed1058adbb3342113c1a35a228c1"` [INFO] [stderr] Checking rand v0.5.5 [INFO] [stderr] Checking my_bot v0.1.0 (/opt/crater/workdir) [INFO] [stderr] error: incorrect close delimiter: `}` [INFO] [stderr] --> src/hlt/game_map.rs:150:9 [INFO] [stderr] | [INFO] [stderr] 148 | let zone_radius = if self.width < 33 { [INFO] [stderr] | - close delimiter possibly meant for this [INFO] [stderr] 149 | (3i32 [INFO] [stderr] | - un-closed delimiter [INFO] [stderr] 150 | } else if self.width < 50 { [INFO] [stderr] | ^ incorrect close delimiter [INFO] [stderr] [INFO] [stderr] error: incorrect close delimiter: `)` [INFO] [stderr] --> src/hlt/game_map.rs:151:17 [INFO] [stderr] | [INFO] [stderr] 150 | } else if self.width < 50 { [INFO] [stderr] | - un-closed delimiter [INFO] [stderr] 151 | 4i32) [INFO] [stderr] | ^ incorrect close delimiter [INFO] [stderr] [INFO] [stderr] error: expected one of `.`, `;`, `?`, `else`, or an operator, found `}` [INFO] [stderr] --> src/hlt/game_map.rs:152:9 [INFO] [stderr] | [INFO] [stderr] 151 | 4i32) [INFO] [stderr] | - expected one of `.`, `;`, `?`, `else`, or an operator here [INFO] [stderr] 152 | } else if self.width < 70 { [INFO] [stderr] | ^ unexpected token [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `else` [INFO] [stderr] --> src/hlt/game_map.rs:152:11 [INFO] [stderr] | [INFO] [stderr] 152 | } else if self.width < 70 { [INFO] [stderr] | ^^^^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `else` [INFO] [stderr] --> src/hlt/game_map.rs:154:11 [INFO] [stderr] | [INFO] [stderr] 154 | } else { [INFO] [stderr] | ^^^^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `;` [INFO] [stderr] --> src/hlt/game_map.rs:156:10 [INFO] [stderr] | [INFO] [stderr] 156 | }; [INFO] [stderr] | ^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `for` [INFO] [stderr] --> src/hlt/game_map.rs:157:9 [INFO] [stderr] | [INFO] [stderr] 156 | }; [INFO] [stderr] | - expected one of 11 possible tokens here [INFO] [stderr] 157 | for x in 0..self.width { [INFO] [stderr] | ^^^ unexpected token [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `let` [INFO] [stderr] --> src/hlt/game_map.rs:172:9 [INFO] [stderr] | [INFO] [stderr] 171 | } [INFO] [stderr] | - expected one of 11 possible tokens here [INFO] [stderr] 172 | let winner = heap.pop(); { [INFO] [stderr] | ^^^ unexpected token [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `{` [INFO] [stderr] --> src/hlt/game_map.rs:172:34 [INFO] [stderr] | [INFO] [stderr] 172 | let winner = heap.pop(); { [INFO] [stderr] | ^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error: incorrect close delimiter: `}` [INFO] [stderr] --> src/hlt/game_map.rs:150:9 [INFO] [stderr] | [INFO] [stderr] 148 | let zone_radius = if self.width < 33 { [INFO] [stderr] | - close delimiter possibly meant for this [INFO] [stderr] 149 | (3i32 [INFO] [stderr] | - un-closed delimiter [INFO] [stderr] 150 | } else if self.width < 50 { [INFO] [stderr] | ^ incorrect close delimiter [INFO] [stderr] [INFO] [stderr] error: incorrect close delimiter: `)` [INFO] [stderr] --> src/hlt/game_map.rs:151:17 [INFO] [stderr] | [INFO] [stderr] 150 | } else if self.width < 50 { [INFO] [stderr] | - un-closed delimiter [INFO] [stderr] 151 | 4i32) [INFO] [stderr] | ^ incorrect close delimiter [INFO] [stderr] [INFO] [stderr] error: expected one of `.`, `;`, `?`, `else`, or an operator, found `}` [INFO] [stderr] --> src/hlt/game_map.rs:152:9 [INFO] [stderr] | [INFO] [stderr] 151 | 4i32) [INFO] [stderr] | - expected one of `.`, `;`, `?`, `else`, or an operator here [INFO] [stderr] 152 | } else if self.width < 70 { [INFO] [stderr] | ^ unexpected token [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `else` [INFO] [stderr] --> src/hlt/game_map.rs:152:11 [INFO] [stderr] | [INFO] [stderr] 152 | } else if self.width < 70 { [INFO] [stderr] | ^^^^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `else` [INFO] [stderr] --> src/hlt/game_map.rs:154:11 [INFO] [stderr] | [INFO] [stderr] 154 | } else { [INFO] [stderr] | ^^^^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `;` [INFO] [stderr] --> src/hlt/game_map.rs:156:10 [INFO] [stderr] | [INFO] [stderr] 156 | }; [INFO] [stderr] | ^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `for` [INFO] [stderr] --> src/hlt/game_map.rs:157:9 [INFO] [stderr] | [INFO] [stderr] 156 | }; [INFO] [stderr] | - expected one of 11 possible tokens here [INFO] [stderr] 157 | for x in 0..self.width { [INFO] [stderr] | ^^^ unexpected token [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `let` [INFO] [stderr] --> src/hlt/game_map.rs:172:9 [INFO] [stderr] | [INFO] [stderr] 171 | } [INFO] [stderr] | - expected one of 11 possible tokens here [INFO] [stderr] 172 | let winner = heap.pop(); { [INFO] [stderr] | ^^^ unexpected token [INFO] [stderr] [INFO] [stderr] error: expected one of `async`, `const`, `crate`, `default`, `existential`, `extern`, `fn`, `pub`, `type`, `unsafe`, or `}`, found `{` [INFO] [stderr] --> src/hlt/game_map.rs:172:34 [INFO] [stderr] | [INFO] [stderr] 172 | let winner = heap.pop(); { [INFO] [stderr] | ^ expected one of 11 possible tokens here [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `best_dropoffs` in this scope [INFO] [stderr] --> src/main.rs:88:32 [INFO] [stderr] | [INFO] [stderr] 88 | let drop_pos = best_dropoffs[drop_id.parse::().unwrap()]; [INFO] [stderr] | ^^^^^^^^^^^^^ did you mean `best_dropoff`? [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `best_dropoffs` in this scope [INFO] [stderr] --> src/main.rs:140:29 [INFO] [stderr] | [INFO] [stderr] 140 | for i in 0..best_dropoffs.len() { [INFO] [stderr] | ^^^^^^^^^^^^^ did you mean `best_dropoff`? [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `best_dropoffs` in this scope [INFO] [stderr] --> src/main.rs:141:86 [INFO] [stderr] | [INFO] [stderr] 141 | let distance = game.game_map.calculate_distance(&ship.position, &best_dropoffs[i]); [INFO] [stderr] | ^^^^^^^^^^^^^ did you mean `best_dropoff`? [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `best_dropoffs` in this scope [INFO] [stderr] --> src/main.rs:88:32 [INFO] [stderr] | [INFO] [stderr] 88 | let drop_pos = best_dropoffs[drop_id.parse::().unwrap()]; [INFO] [stderr] | ^^^^^^^^^^^^^ did you mean `best_dropoff`? [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `best_dropoffs` in this scope [INFO] [stderr] --> src/main.rs:140:29 [INFO] [stderr] | [INFO] [stderr] 140 | for i in 0..best_dropoffs.len() { [INFO] [stderr] | ^^^^^^^^^^^^^ did you mean `best_dropoff`? [INFO] [stderr] [INFO] [stderr] error[E0425]: cannot find value `best_dropoffs` in this scope [INFO] [stderr] --> src/main.rs:141:86 [INFO] [stderr] | [INFO] [stderr] 141 | let distance = game.game_map.calculate_distance(&ship.position, &best_dropoffs[i]); [INFO] [stderr] | ^^^^^^^^^^^^^ did you mean `best_dropoff`? [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/hlt/game.rs:121:9 [INFO] [stderr] | [INFO] [stderr] 121 | turns_left [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/hlt/game.rs:120:26 [INFO] [stderr] | [INFO] [stderr] 120 | let turns_left = self.constants.max_turns - self.turn_number; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/hlt/game_map.rs:47:9 [INFO] [stderr] | [INFO] [stderr] 47 | return toroidal_dx + toroidal_dy; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `toroidal_dx + toroidal_dy` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/hlt/input.rs:57:9 [INFO] [stderr] | [INFO] [stderr] 57 | result [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/hlt/input.rs:53:22 [INFO] [stderr] | [INFO] [stderr] 53 | let result = match token.parse() { [INFO] [stderr] | ______________________^ [INFO] [stderr] 54 | | Ok(x) => x, [INFO] [stderr] 55 | | Err(_) => self.log.borrow_mut().panic(&format!("Can't parse '{}'.", token)), [INFO] [stderr] 56 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/hlt/game.rs:121:9 [INFO] [stderr] | [INFO] [stderr] 121 | turns_left [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/hlt/game.rs:120:26 [INFO] [stderr] | [INFO] [stderr] 120 | let turns_left = self.constants.max_turns - self.turn_number; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/hlt/game_map.rs:47:9 [INFO] [stderr] | [INFO] [stderr] 47 | return toroidal_dx + toroidal_dy; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove `return` as shown: `toroidal_dx + toroidal_dy` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/hlt/input.rs:57:9 [INFO] [stderr] | [INFO] [stderr] 57 | result [INFO] [stderr] | ^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/hlt/input.rs:53:22 [INFO] [stderr] | [INFO] [stderr] 53 | let result = match token.parse() { [INFO] [stderr] | ______________________^ [INFO] [stderr] 54 | | Ok(x) => x, [INFO] [stderr] 55 | | Err(_) => self.log.borrow_mut().panic(&format!("Can't parse '{}'.", token)), [INFO] [stderr] 56 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] error: aborting due to 12 previous errors [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0425`. [INFO] [stderr] error: Could not compile `my_bot`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: aborting due to 12 previous errors [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0425`. [INFO] [stderr] error: Could not compile `my_bot`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "34f677f79b7bc6f3695649ae051bc7eadb69ed1058adbb3342113c1a35a228c1"` [INFO] running `"docker" "rm" "-f" "34f677f79b7bc6f3695649ae051bc7eadb69ed1058adbb3342113c1a35a228c1"` [INFO] [stdout] 34f677f79b7bc6f3695649ae051bc7eadb69ed1058adbb3342113c1a35a228c1