[INFO] cloning repository https://github.com/oskrgab/rustlings [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/oskrgab/rustlings" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Foskrgab%2Frustlings", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Foskrgab%2Frustlings'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] aa040e43702c3f73aaa8b9a0e4ff03108612807b [INFO] building oskrgab/rustlings against master#c7f6aa2869acdbf014d094c6e427e554e160b6db for pr-146237-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Foskrgab%2Frustlings" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-2-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/oskrgab/rustlings [INFO] finished tweaking git repo https://github.com/oskrgab/rustlings [INFO] tweaked toml for git repo https://github.com/oskrgab/rustlings written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/oskrgab/rustlings on toolchain c7f6aa2869acdbf014d094c6e427e554e160b6db [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/oskrgab/rustlings 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" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 68cbc1f1f5e18b95e588f1056f86ce2ea5c6ea807240d36e6dcdb69629877685 [INFO] running `Command { std: "docker" "start" "-a" "68cbc1f1f5e18b95e588f1056f86ce2ea5c6ea807240d36e6dcdb69629877685", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "68cbc1f1f5e18b95e588f1056f86ce2ea5c6ea807240d36e6dcdb69629877685", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "68cbc1f1f5e18b95e588f1056f86ce2ea5c6ea807240d36e6dcdb69629877685", kill_on_drop: false }` [INFO] [stdout] 68cbc1f1f5e18b95e588f1056f86ce2ea5c6ea807240d36e6dcdb69629877685 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+c7f6aa2869acdbf014d094c6e427e554e160b6db" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d7421e7cc2b26589c80d1cdf42f496e03c66b63cd7eef4974ffd8bacc1f28b52 [INFO] running `Command { std: "docker" "start" "-a" "d7421e7cc2b26589c80d1cdf42f496e03c66b63cd7eef4974ffd8bacc1f28b52", kill_on_drop: false }` [INFO] [stderr] Compiling exercises v0.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: for loop over an `Option`. This is more readably written as an `if let` statement [INFO] [stdout] --> exercises/22_clippy/clippy2.rs:5:14 [INFO] [stdout] | [INFO] [stdout] 5 | for x in option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(for_loops_over_fallibles)]` on by default [INFO] [stdout] help: to check pattern in a loop use `while let` [INFO] [stdout] | [INFO] [stdout] 5 - for x in option { [INFO] [stdout] 5 + while let Some(x) = option { [INFO] [stdout] | [INFO] [stdout] help: consider using `if let` to clear intent [INFO] [stdout] | [INFO] [stdout] 5 - for x in option { [INFO] [stdout] 5 + if let Some(x) = option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find macro `my_macro` in this scope [INFO] [stdout] --> exercises/21_macros/macros3.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | my_macro!(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: have you added the `#[macro_use]` on the module/import? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/02_functions/functions5.rs:2:24 [INFO] [stdout] | [INFO] [stdout] 2 | fn square(num: i32) -> i32 { [INFO] [stdout] | ------ ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] 3 | num * num; [INFO] [stdout] | - help: remove this semicolon to return this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `is_evening` in this scope [INFO] [stdout] --> exercises/04_primitive_types/primitive_types1.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | if is_evening { [INFO] [stdout] | ^^^^^^^^^^ help: a local variable with a similar name exists: `is_morning` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> exercises/03_if/if3.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 7 | } else if animal == "snake" { [INFO] [stdout] | ____________- [INFO] [stdout] 8 | | 3 [INFO] [stdout] | | - expected because of this [INFO] [stdout] 9 | | } else { [INFO] [stdout] 10 | | "Unknown" [INFO] [stdout] | | ^^^^^^^^^ expected integer, found `&str` [INFO] [stdout] 11 | | }; [INFO] [stdout] | |_____- `if` and `else` have incompatible types [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "functions5") due to 1 previous error [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "if3") due to 1 previous error [INFO] [stdout] warning: unused macro definition: `my_macro` [INFO] [stdout] --> exercises/21_macros/macros3.rs:4:18 [INFO] [stdout] | [INFO] [stdout] 4 | macro_rules! my_macro { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `my_macro` [INFO] [stdout] --> exercises/21_macros/macros1.rs:1:14 [INFO] [stdout] | [INFO] [stdout] 1 | macro_rules! my_macro { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 1 argument but 0 arguments were supplied [INFO] [stdout] --> exercises/02_functions/functions3.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | call_me(); [INFO] [stdout] | ^^^^^^^-- argument #1 of type `u8` is missing [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/02_functions/functions3.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn call_me(num: u8) { [INFO] [stdout] | ^^^^^^^ ------- [INFO] [stdout] help: provide the argument [INFO] [stdout] | [INFO] [stdout] 9 | call_me(/* u8 */); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] error[E0423]: expected function, found macro `my_macro` [INFO] [stdout] --> exercises/21_macros/macros1.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | my_macro(); [INFO] [stdout] | ^^^^^^^^ not a function [INFO] [stdout] | [INFO] [stdout] help: use `!` to invoke the macro [INFO] [stdout] | [INFO] [stdout] 9 | my_macro!(); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "macros3") due to 1 previous error; 1 warning emitted [INFO] [stdout] For more information about this error, try `rustc --explain E0423`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "primitive_types1") due to 1 previous error [INFO] [stdout] For more information about this error, try `rustc --explain E0061`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "functions3") due to 1 previous error [INFO] [stderr] error: could not compile `exercises` (bin "macros1") due to 1 previous error; 1 warning emitted [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/06_move_semantics/move_semantics5.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | fn string_uppercase(mut data: &String) { [INFO] [stdout] | ------- expected due to this parameter type [INFO] [stdout] 13 | data = data.to_uppercase(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ expected `&String`, found `String` [INFO] [stdout] | [INFO] [stdout] help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding [INFO] [stdout] | [INFO] [stdout] 12 ~ fn string_uppercase(data: &mut String) { [INFO] [stdout] 13 ~ *data = data.to_uppercase(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cents_per_gram` [INFO] [stdout] --> exercises/07_structs/structs3.rs:33:24 [INFO] [stdout] | [INFO] [stdout] 33 | fn get_fees(&self, cents_per_gram: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_cents_per_gram` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `data` [INFO] [stdout] --> exercises/06_move_semantics/move_semantics5.rs:23:22 [INFO] [stdout] | [INFO] [stdout] 19 | let data = "Rust is great!".to_string(); [INFO] [stdout] | ---- move occurs because `data` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 20 | [INFO] [stdout] 21 | get_char(data); [INFO] [stdout] | ---- value moved here [INFO] [stdout] 22 | [INFO] [stdout] 23 | string_uppercase(&data); [INFO] [stdout] | ^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in function `get_char` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> exercises/06_move_semantics/move_semantics5.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | fn get_char(data: String) -> char { [INFO] [stdout] | -------- ^^^^^^ this parameter takes ownership of the value [INFO] [stdout] | | [INFO] [stdout] | in this function [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 21 | get_char(data.clone()); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0382. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "move_semantics5") due to 2 previous errors [INFO] [stdout] error[E0282]: type annotations needed for `Vec<_>` [INFO] [stdout] --> exercises/20_threads/threads1.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let mut results = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^ ---------- type must be known at this point [INFO] [stdout] | [INFO] [stdout] help: consider giving `results` an explicit type, where the type for type parameter `T` is specified [INFO] [stdout] | [INFO] [stdout] 23 | let mut results: Vec = Vec::new(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0282`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "threads1") due to 1 previous error [INFO] running `Command { std: "docker" "inspect" "d7421e7cc2b26589c80d1cdf42f496e03c66b63cd7eef4974ffd8bacc1f28b52", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d7421e7cc2b26589c80d1cdf42f496e03c66b63cd7eef4974ffd8bacc1f28b52", kill_on_drop: false }` [INFO] [stdout] d7421e7cc2b26589c80d1cdf42f496e03c66b63cd7eef4974ffd8bacc1f28b52