[INFO] cloning repository https://github.com/tweedegolf/rust-workshop-exercises [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tweedegolf/rust-workshop-exercises" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftweedegolf%2Frust-workshop-exercises", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftweedegolf%2Frust-workshop-exercises'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0ce208b93c4f1dea8ca1f17b67efc555707e891c [INFO] checking tweedegolf/rust-workshop-exercises against master#17ffbc81a30c094193836a5d7f90dff273b5df93 for pr-138785 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftweedegolf%2Frust-workshop-exercises" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/tweedegolf/rust-workshop-exercises on toolchain 17ffbc81a30c094193836a5d7f90dff273b5df93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/tweedegolf/rust-workshop-exercises [INFO] finished tweaking git repo https://github.com/tweedegolf/rust-workshop-exercises [INFO] tweaked toml for git repo https://github.com/tweedegolf/rust-workshop-exercises written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/tweedegolf/rust-workshop-exercises already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded ryu v1.0.6 [INFO] [stderr] Downloaded serde_json v1.0.72 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a74e5f9f4aa8a09288a83294f31e839059dde6c8cd8d9d1d56182a9aed2c22c2 [INFO] running `Command { std: "docker" "start" "-a" "a74e5f9f4aa8a09288a83294f31e839059dde6c8cd8d9d1d56182a9aed2c22c2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a74e5f9f4aa8a09288a83294f31e839059dde6c8cd8d9d1d56182a9aed2c22c2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a74e5f9f4aa8a09288a83294f31e839059dde6c8cd8d9d1d56182a9aed2c22c2", kill_on_drop: false }` [INFO] [stdout] a74e5f9f4aa8a09288a83294f31e839059dde6c8cd8d9d1d56182a9aed2c22c2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 029ef33ec951f6e29787a5fc71494742a5f21bb44ed9a2381c8a9bdbcdbead05 [INFO] running `Command { std: "docker" "start" "-a" "029ef33ec951f6e29787a5fc71494742a5f21bb44ed9a2381c8a9bdbcdbead05", kill_on_drop: false }` [INFO] [stderr] Compiling serde v1.0.130 [INFO] [stderr] Compiling ryu v1.0.6 [INFO] [stderr] Compiling serde_json v1.0.72 [INFO] [stderr] Checking itoa v0.4.8 [INFO] [stderr] Checking rust-workshop-exercises v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: unexpected parentheses surrounding `for` loop head [INFO] [stdout] --> src/bin/04.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | for (n in [10, 20, 30, 40]) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove parentheses in `for` loop [INFO] [stdout] | [INFO] [stdout] 2 - for (n in [10, 20, 30, 40]) { [INFO] [stdout] 2 + for n in [10, 20, 30, 40] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `i` on type `[{integer}; 5]` [INFO] [stdout] --> src/bin/05.rs:4:29 [INFO] [stdout] | [INFO] [stdout] 4 | half_even(&mut data.i); [INFO] [stdout] | ^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `*data`, which is behind a `&` reference [INFO] [stdout] --> src/bin/05.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | *data = data / 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ `data` is a `&` reference, so the data it refers to cannot be written [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be a mutable reference [INFO] [stdout] | [INFO] [stdout] 8 | fn half_even(data: &mut i32) { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0594, E0609. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0594`. [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `n` in this scope [INFO] [stdout] --> src/bin/04.rs:3:23 [INFO] [stdout] | [INFO] [stdout] 3 | let mult = if n < 25 { [INFO] [stdout] | ^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `n` in this scope [INFO] [stdout] --> src/bin/04.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | n * 4 [INFO] [stdout] | ^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `n` in this scope [INFO] [stdout] --> src/bin/04.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | n * 3; [INFO] [stdout] | ^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unexpected parentheses surrounding `for` loop head [INFO] [stdout] --> src/bin/04.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | for (n in [10, 20, 30, 40]) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] help: remove parentheses in `for` loop [INFO] [stdout] | [INFO] [stdout] 2 - for (n in [10, 20, 30, 40]) { [INFO] [stdout] 2 + for n in [10, 20, 30, 40] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "05" test) due to 2 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0277]: `()` doesn't implement `std::fmt::Display` [INFO] [stdout] --> src/bin/01.rs:2:20 [INFO] [stdout] | [INFO] [stdout] 2 | println!("{}", multiply(10, 20)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ `()` cannot be formatted with the default formatter [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Display` is not implemented for `()` [INFO] [stdout] = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "04") due to 4 previous errors [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/bin/02.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | if (bigger(10, 20)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 2 - if (bigger(10, 20)) { [INFO] [stdout] 2 + if bigger(10, 20) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: 2 positional arguments in format string, but no arguments were given [INFO] [stdout] --> src/bin/03.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | println!("{} is largest and {} is smallest"); [INFO] [stdout] | ^^ ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/03.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let input = [23, 82, 16, 45, 21, 94, 12, 34]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0609]: no field `i` on type `[{integer}; 5]` [INFO] [stdout] --> src/bin/05.rs:4:29 [INFO] [stdout] | [INFO] [stdout] 4 | half_even(&mut data.i); [INFO] [stdout] | ^ unknown field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `()` doesn't implement `std::fmt::Display` [INFO] [stdout] --> src/bin/01.rs:2:20 [INFO] [stdout] | [INFO] [stdout] 2 | println!("{}", multiply(10, 20)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ `()` cannot be formatted with the default formatter [INFO] [stdout] | [INFO] [stdout] = help: the trait `std::fmt::Display` is not implemented for `()` [INFO] [stdout] = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/02.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | if (bigger(10, 20)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ expected `bool`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `*data`, which is behind a `&` reference [INFO] [stdout] --> src/bin/05.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | *data = data / 2 [INFO] [stdout] | ^^^^^^^^^^^^^^^^ `data` is a `&` reference, so the data it refers to cannot be written [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be a mutable reference [INFO] [stdout] | [INFO] [stdout] 8 | fn half_even(data: &mut i32) { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: 2 positional arguments in format string, but no arguments were given [INFO] [stdout] --> src/bin/03.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | println!("{} is largest and {} is smallest"); [INFO] [stdout] | ^^ ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/02.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | fn bigger(a: i32, b: i32) -> i32 { [INFO] [stdout] | ------ ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] note: consider returning one of these bindings [INFO] [stdout] --> src/bin/02.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | fn bigger(a: i32, b: i32) -> i32 { [INFO] [stdout] | ^ ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0594, E0609. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0594`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> src/bin/03.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let input = [23, 82, 16, 45, 21, 94, 12, 34]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "05") due to 2 previous errors [INFO] [stdout] error[E0425]: cannot find value `n` in this scope [INFO] [stdout] --> src/bin/04.rs:3:23 [INFO] [stdout] | [INFO] [stdout] 3 | let mult = if n < 25 { [INFO] [stdout] | ^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `n` in this scope [INFO] [stdout] --> src/bin/04.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | n * 4 [INFO] [stdout] | ^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `n` in this scope [INFO] [stdout] --> src/bin/04.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | n * 3; [INFO] [stdout] | ^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "02") due to 2 previous errors; 1 warning emitted [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "03") due to 1 previous error; 1 warning emitted [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/01.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | fn multiply(a: i32, b: i32) { [INFO] [stdout] | - help: try adding a return type: `-> i32` [INFO] [stdout] 6 | a * b [INFO] [stdout] | ^^^^^ expected `()`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "03" test) due to 1 previous error; 1 warning emitted [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/01.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | fn multiply(a: i32, b: i32) { [INFO] [stdout] | - help: try adding a return type: `-> i32` [INFO] [stdout] 6 | a * b [INFO] [stdout] | ^^^^^ expected `()`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/01.rs:15:37 [INFO] [stdout] | [INFO] [stdout] 15 | assert!(multiply(10, 10) == 100); [INFO] [stdout] | ---------------- ^^^ expected `()`, found integer [INFO] [stdout] | | [INFO] [stdout] | expected because this is `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/01.rs:16:35 [INFO] [stdout] | [INFO] [stdout] 16 | assert!(multiply(2, 2) == 4); [INFO] [stdout] | -------------- ^ expected `()`, found integer [INFO] [stdout] | | [INFO] [stdout] | expected because this is `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "04" test) due to 4 previous errors [INFO] [stdout] Some errors have detailed explanations: E0277, E0308. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "01") due to 2 previous errors [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "01" test) due to 4 previous errors [INFO] [stdout] error[E0425]: cannot find function `bigger` in this scope [INFO] [stdout] --> src/bin/02.rs:19:17 [INFO] [stdout] | [INFO] [stdout] 19 | assert!(bigger(20, 10)); [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 17 + use crate::bigger; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `bigger` in this scope [INFO] [stdout] --> src/bin/02.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | assert!(!bigger(10, 20)); [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 17 + use crate::bigger; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/bin/02.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | if (bigger(10, 20)) { [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 2 - if (bigger(10, 20)) { [INFO] [stdout] 2 + if bigger(10, 20) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/02.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | if (bigger(10, 20)) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ expected `bool`, found `i32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/02.rs:9:30 [INFO] [stdout] | [INFO] [stdout] 9 | fn bigger(a: i32, b: i32) -> i32 { [INFO] [stdout] | ------ ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] note: consider returning one of these bindings [INFO] [stdout] --> src/bin/02.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | fn bigger(a: i32, b: i32) -> i32 { [INFO] [stdout] | ^ ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0425. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "02" test) due to 4 previous errors; 1 warning emitted [INFO] running `Command { std: "docker" "inspect" "029ef33ec951f6e29787a5fc71494742a5f21bb44ed9a2381c8a9bdbcdbead05", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "029ef33ec951f6e29787a5fc71494742a5f21bb44ed9a2381c8a9bdbcdbead05", kill_on_drop: false }` [INFO] [stdout] 029ef33ec951f6e29787a5fc71494742a5f21bb44ed9a2381c8a9bdbcdbead05