[INFO] cloning repository https://github.com/rootedxpert/rust_learning
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/rootedxpert/rust_learning" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frootedxpert%2Frust_learning", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frootedxpert%2Frust_learning'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] 67b08c6401bd878e0ee9b8e55c38b79dacd9fe97
[INFO] checking rootedxpert/rust_learning against 3154cc1a3e6424e44f438a95007d043ed5ceaaf6+rustflags=-Znext-solver=coherence for pr-133502-30
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frootedxpert%2Frust_learning" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'...
[INFO] [stderr] done.
[INFO] started tweaking git repo https://github.com/rootedxpert/rust_learning
[INFO] finished tweaking git repo https://github.com/rootedxpert/rust_learning
[INFO] tweaked toml for git repo https://github.com/rootedxpert/rust_learning written to /workspace/builds/worker-1-tc1/source/Cargo.toml
[INFO] validating manifest of git repo https://github.com/rootedxpert/rust_learning on toolchain 3154cc1a3e6424e44f438a95007d043ed5ceaaf6
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+3154cc1a3e6424e44f438a95007d043ed5ceaaf6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate git repo https://github.com/rootedxpert/rust_learning 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" "+3154cc1a3e6424e44f438a95007d043ed5ceaaf6" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,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" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:77db811e55d90add9212f6832c23229e3de5f1c1f9905e8cb07319ea15df73ac" "sleep" "infinity", kill_on_drop: false }`
[INFO] [stdout] 80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3
[INFO] running `Command { std: "docker" "start" "80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3" "/opt/rustwide/cargo-home/bin/cargo" "+3154cc1a3e6424e44f438a95007d043ed5ceaaf6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Znext-solver=coherence" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-w" "/opt/rustwide/workdir" "--user" "0:0" "80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3" "/opt/rustwide/cargo-home/bin/cargo" "+3154cc1a3e6424e44f438a95007d043ed5ceaaf6" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stderr]     Checking learning v0.1.0 (/opt/rustwide/workdir)
[INFO] [stdout] error[E0594]: cannot assign to `user.name`, which is behind a `&` reference
[INFO] [stdout]   --> src/modules/borrowing/main.rs:45:5
[INFO] [stdout]    |
[INFO] [stdout] 45 |     user.name = new_name; // user.name is behind a & reference
[INFO] [stdout]    |     ^^^^^^^^^ `user` 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] 44 | fn update_name(user: &mut User, new_name: String) {
[INFO] [stdout]    |                       +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0502]: cannot borrow `user1` as immutable because it is also borrowed as mutable
[INFO] [stdout]   --> src/modules/borrowing/main.rs:74:17
[INFO] [stdout]    |
[INFO] [stdout] 73 |     let user2 = &mut user1; // now user1 is still valid, all predetrimed at compile time,under the hood user1 is borrowed to user2, ...
[INFO] [stdout]    |                 ---------- mutable borrow occurs here
[INFO] [stdout] 74 |     let user3 = &user1; // now user1 is no longer valid as user1 is already borrowed mutably by user2
[INFO] [stdout]    |                 ^^^^^^ immutable borrow occurs here
[INFO] [stdout] 75 |     update_name_v2(user2, String::from("Doe"));
[INFO] [stdout]    |                    ----- mutable borrow later used here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: use of moved value: `user2`
[INFO] [stdout]   --> src/modules/ownership/main.rs:26:16
[INFO] [stdout]    |
[INFO] [stdout] 23 |     let user2 = user1; // now user1 is still valid, all predetrimed at compile time,under the hood user1 is borrowed to user2, so us...
[INFO] [stdout]    |         ----- move occurs because `user2` has type `String`, which does not implement the `Copy` trait
[INFO] [stdout] 24 |     print_user(user2);
[INFO] [stdout]    |                ----- value moved here
[INFO] [stdout] 25 |     // as ownership is already passed to above print_user you cant call this function again with user2
[INFO] [stdout] 26 |     print_user(user2);
[INFO] [stdout]    |                ^^^^^ value used here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `print_user` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/modules/ownership/main.rs:33:21
[INFO] [stdout]    |
[INFO] [stdout] 33 | fn print_user(user: String) {
[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] 24 |     print_user(user2.clone());
[INFO] [stdout]    |                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `user2`
[INFO] [stdout]   --> src/modules/ownership/main.rs:30:27
[INFO] [stdout]    |
[INFO] [stdout] 23 |     let user2 = user1; // now user1 is still valid, all predetrimed at compile time,under the hood user1 is borrowed to user2, so us...
[INFO] [stdout]    |         ----- move occurs because `user2` has type `String`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 26 |     print_user(user2);
[INFO] [stdout]    |                ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 30 |     println!("User1: {}", user2);
[INFO] [stdout]    |                           ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `print_user` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/modules/ownership/main.rs:33:21
[INFO] [stdout]    |
[INFO] [stdout] 33 | fn print_user(user: String) {
[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] 26 |     print_user(user2.clone());
[INFO] [stdout]    |                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0594]: cannot assign to `user.name`, which is behind a `&` reference
[INFO] [stdout]   --> src/modules/borrowing/main.rs:45:5
[INFO] [stdout]    |
[INFO] [stdout] 45 |     user.name = new_name; // user.name is behind a & reference
[INFO] [stdout]    |     ^^^^^^^^^ `user` 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] 44 | fn update_name(user: &mut User, new_name: String) {
[INFO] [stdout]    |                       +++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0502]: cannot borrow `user1` as immutable because it is also borrowed as mutable
[INFO] [stdout]   --> src/modules/borrowing/main.rs:74:17
[INFO] [stdout]    |
[INFO] [stdout] 73 |     let user2 = &mut user1; // now user1 is still valid, all predetrimed at compile time,under the hood user1 is borrowed to user2, ...
[INFO] [stdout]    |                 ---------- mutable borrow occurs here
[INFO] [stdout] 74 |     let user3 = &user1; // now user1 is no longer valid as user1 is already borrowed mutably by user2
[INFO] [stdout]    |                 ^^^^^^ immutable borrow occurs here
[INFO] [stdout] 75 |     update_name_v2(user2, String::from("Doe"));
[INFO] [stdout]    |                    ----- mutable borrow later used here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0382, E0502, E0594.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0382`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `learning` (bin "learning") due to 4 previous errors
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] [stdout] error[E0382]: use of moved value: `user2`
[INFO] [stdout]   --> src/modules/ownership/main.rs:26:16
[INFO] [stdout]    |
[INFO] [stdout] 23 |     let user2 = user1; // now user1 is still valid, all predetrimed at compile time,under the hood user1 is borrowed to user2, so us...
[INFO] [stdout]    |         ----- move occurs because `user2` has type `String`, which does not implement the `Copy` trait
[INFO] [stdout] 24 |     print_user(user2);
[INFO] [stdout]    |                ----- value moved here
[INFO] [stdout] 25 |     // as ownership is already passed to above print_user you cant call this function again with user2
[INFO] [stdout] 26 |     print_user(user2);
[INFO] [stdout]    |                ^^^^^ value used here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `print_user` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/modules/ownership/main.rs:33:21
[INFO] [stdout]    |
[INFO] [stdout] 33 | fn print_user(user: String) {
[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] 24 |     print_user(user2.clone());
[INFO] [stdout]    |                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0382]: borrow of moved value: `user2`
[INFO] [stdout]   --> src/modules/ownership/main.rs:30:27
[INFO] [stdout]    |
[INFO] [stdout] 23 |     let user2 = user1; // now user1 is still valid, all predetrimed at compile time,under the hood user1 is borrowed to user2, so us...
[INFO] [stdout]    |         ----- move occurs because `user2` has type `String`, which does not implement the `Copy` trait
[INFO] [stdout] ...
[INFO] [stdout] 26 |     print_user(user2);
[INFO] [stdout]    |                ----- value moved here
[INFO] [stdout] ...
[INFO] [stdout] 30 |     println!("User1: {}", user2);
[INFO] [stdout]    |                           ^^^^^ value borrowed here after move
[INFO] [stdout]    |
[INFO] [stdout] note: consider changing this parameter type in function `print_user` to borrow instead if owning the value isn't necessary
[INFO] [stdout]   --> src/modules/ownership/main.rs:33:21
[INFO] [stdout]    |
[INFO] [stdout] 33 | fn print_user(user: String) {
[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] 26 |     print_user(user2.clone());
[INFO] [stdout]    |                     ++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] Some errors have detailed explanations: E0382, E0502, E0594.
[INFO] [stdout] 
[INFO] [stdout] For more information about an error, try `rustc --explain E0382`.
[INFO] [stdout] 
[INFO] [stderr] error: could not compile `learning` (bin "learning" test) due to 4 previous errors
[INFO] running `Command { std: "docker" "inspect" "80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3", kill_on_drop: false }`
[INFO] [stdout] 80f10779a8506b7557090bf845627f3743cb0aafe835e7f5193f77fc040afbd3
