[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 try#df1b9bf194c9183fb7c0604484171064069ce232 for pr-149195-4 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftweedegolf%2Frust-workshop-exercises" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [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-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/tweedegolf/rust-workshop-exercises on toolchain df1b9bf194c9183fb7c0604484171064069ce232 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+df1b9bf194c9183fb7c0604484171064069ce232" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [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" "+df1b9bf194c9183fb7c0604484171064069ce232" "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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:29356a839a4d14451438f794ce8414e707d72405f44418718d724d22562fe786" "/opt/rustwide/cargo-home/bin/cargo" "+df1b9bf194c9183fb7c0604484171064069ce232" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0cbbe393762b28bba7faa65d06aef291dbfc5de9e5d2550ec01edfcb32bdccd6 [INFO] running `Command { std: "docker" "start" "-a" "0cbbe393762b28bba7faa65d06aef291dbfc5de9e5d2550ec01edfcb32bdccd6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0cbbe393762b28bba7faa65d06aef291dbfc5de9e5d2550ec01edfcb32bdccd6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0cbbe393762b28bba7faa65d06aef291dbfc5de9e5d2550ec01edfcb32bdccd6", kill_on_drop: false }` [INFO] [stdout] 0cbbe393762b28bba7faa65d06aef291dbfc5de9e5d2550ec01edfcb32bdccd6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:29356a839a4d14451438f794ce8414e707d72405f44418718d724d22562fe786" "/opt/rustwide/cargo-home/bin/cargo" "+df1b9bf194c9183fb7c0604484171064069ce232" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] ac5fb6f8436e75e8fc893ffbf02593b72caf5e409f6d51dfd4e3b5bc74f8256c [INFO] running `Command { std: "docker" "start" "-a" "ac5fb6f8436e75e8fc893ffbf02593b72caf5e409f6d51dfd4e3b5bc74f8256c", kill_on_drop: false }` [INFO] [stderr] Compiling ryu v1.0.6 [INFO] [stderr] Compiling serde v1.0.130 [INFO] [stderr] Compiling serde_json v1.0.72 [INFO] [stderr] Checking rust-workshop-exercises v0.1.0 (/opt/rustwide/workdir) [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)]` (part of `#[warn(unused)]`) 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)]` (part of `#[warn(unused)]`) 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: 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[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] | required by this formatting parameter [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] [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] [stderr] error: could not compile `rust-workshop-exercises` (bin "03") due to 1 previous error; 1 warning emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [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] [stderr] error: could not compile `rust-workshop-exercises` (bin "05" test) due to 2 previous errors [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] [stderr] error: could not compile `rust-workshop-exercises` (bin "03" test) due to 1 previous error; 1 warning emitted [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 it cannot be written to [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] [stderr] error: could not compile `rust-workshop-exercises` (bin "05") due to 2 previous errors [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] 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 it cannot be written to [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] 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] For more information about this error, try `rustc --explain E0308`. [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] [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)]` (part of `#[warn(unused)]`) on by default [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] 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] [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[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] For more information about this error, try `rustc --explain E0425`. [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)]` (part of `#[warn(unused)]`) 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] [stderr] error: could not compile `rust-workshop-exercises` (bin "02") due to 2 previous errors; 1 warning emitted [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 "01" test) due to 4 previous errors [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [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] [stderr] error: could not compile `rust-workshop-exercises` (bin "04" test) due to 4 previous errors [INFO] [stderr] error: could not compile `rust-workshop-exercises` (bin "04") due to 4 previous errors [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] | required by this formatting parameter [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] [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] [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] running `Command { std: "docker" "inspect" "ac5fb6f8436e75e8fc893ffbf02593b72caf5e409f6d51dfd4e3b5bc74f8256c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ac5fb6f8436e75e8fc893ffbf02593b72caf5e409f6d51dfd4e3b5bc74f8256c", kill_on_drop: false }` [INFO] [stdout] ac5fb6f8436e75e8fc893ffbf02593b72caf5e409f6d51dfd4e3b5bc74f8256c