[INFO] cloning repository https://github.com/cuongtranba/rust-by-example [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cuongtranba/rust-by-example" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcuongtranba%2Frust-by-example", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcuongtranba%2Frust-by-example'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 0be4c5c049dc54b2bb7cc8e9cae2202e7d4a3094 [INFO] testing cuongtranba/rust-by-example against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcuongtranba%2Frust-by-example" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/cuongtranba/rust-by-example [INFO] finished tweaking git repo https://github.com/cuongtranba/rust-by-example [INFO] tweaked toml for git repo https://github.com/cuongtranba/rust-by-example written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cuongtranba/rust-by-example on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/cuongtranba/rust-by-example 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" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "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-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f780fd6112d22eef7a47d228ee3483e8b9e6f68228d82138dd5adafe25164cde [INFO] running `Command { std: "docker" "start" "-a" "f780fd6112d22eef7a47d228ee3483e8b9e6f68228d82138dd5adafe25164cde", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f780fd6112d22eef7a47d228ee3483e8b9e6f68228d82138dd5adafe25164cde", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f780fd6112d22eef7a47d228ee3483e8b9e6f68228d82138dd5adafe25164cde", kill_on_drop: false }` [INFO] [stdout] f780fd6112d22eef7a47d228ee3483e8b9e6f68228d82138dd5adafe25164cde [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 59c42202296c3c4e66670a94313b5022a8dca62b96fa58ebe2f71cccfcc4f3d0 [INFO] running `Command { std: "docker" "start" "-a" "59c42202296c3c4e66670a94313b5022a8dca62b96fa58ebe2f71cccfcc4f3d0", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.153 [INFO] [stderr] Compiling getrandom v0.2.12 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling rust-by-example v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/slice.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let word = first_word(&my_string[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/slice.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let word = first_word(&my_string[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/slice.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let word = first_word(&my_string); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/slice.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let word = first_word(&my_string_literal[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/slice.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let word = first_word(&my_string_literal[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/slice.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let word = first_word(my_string_literal); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0428]: the name `Structure` is defined multiple times [INFO] [stdout] --> src/bin/formatting.rs:52:5 [INFO] [stdout] | [INFO] [stdout] 47 | struct Structure(i32); [INFO] [stdout] | ---------------------- previous definition of the type `Structure` here [INFO] [stdout] ... [INFO] [stdout] 52 | struct Structure(i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ `Structure` redefined here [INFO] [stdout] | [INFO] [stdout] = note: `Structure` must be defined only once in the type namespace of this block [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `s2` [INFO] [stdout] --> src/bin/ownership.rs:25:32 [INFO] [stdout] | [INFO] [stdout] 21 | let s2: String = String::from("hello"); [INFO] [stdout] | -- move occurs because `s2` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 22 | let s3 = take_and_give_back(s2); [INFO] [stdout] | -- value moved here [INFO] [stdout] ... [INFO] [stdout] 25 | println!("s1 = {s1}, s2 = {s2}, s3 = {s3}") [INFO] [stdout] | ^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in function `take_and_give_back` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> src/bin/ownership.rs:41:26 [INFO] [stdout] | [INFO] [stdout] 41 | fn take_and_give_back(v: String) -> String { [INFO] [stdout] | ------------------ ^^^^^^ this parameter takes ownership of the value [INFO] [stdout] | | [INFO] [stdout] | in this function [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] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 22 | let s3 = take_and_give_back(s2.clone()); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-by-example` (bin "ownership") 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 E0428`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-by-example` (bin "formatting") due to 1 previous error [INFO] [stdout] warning: fields `active`, `username`, and `sign_in_count` are never read [INFO] [stdout] --> src/bin/structs.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 2 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 3 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 4 | email: String, [INFO] [stdout] 5 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/bin/function.rs:14:23 [INFO] [stdout] | [INFO] [stdout] 14 | fn samele_with_params(v: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `samele_with_params` is never used [INFO] [stdout] --> src/bin/function.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | fn samele_with_params(v: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/bin/ref_borrow.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let r1 = &s; // no problem [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r2` [INFO] [stdout] --> src/bin/ref_borrow.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let r2 = &s; // no problem [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calculate_len` is never used [INFO] [stdout] --> src/bin/ref_borrow.rs:11:4 [INFO] [stdout] | [INFO] [stdout] 11 | fn calculate_len(s: &String) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `change` is never used [INFO] [stdout] --> src/bin/ref_borrow.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | fn change(s: &mut String) { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_POINTS` is never used [INFO] [stdout] --> src/bin/variables_mutability.rs:1:7 [INFO] [stdout] | [INFO] [stdout] 1 | const MAX_POINTS: u32 = 100_000; // const is always immutable [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "59c42202296c3c4e66670a94313b5022a8dca62b96fa58ebe2f71cccfcc4f3d0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "59c42202296c3c4e66670a94313b5022a8dca62b96fa58ebe2f71cccfcc4f3d0", kill_on_drop: false }` [INFO] [stdout] 59c42202296c3c4e66670a94313b5022a8dca62b96fa58ebe2f71cccfcc4f3d0