[INFO] cloning repository https://github.com/cmplx-xyttmt/learning-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/cmplx-xyttmt/learning-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcmplx-xyttmt%2Flearning-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcmplx-xyttmt%2Flearning-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4cbb6ddd8d22fc3d1a59528007b6f383d62cd2ad [INFO] checking cmplx-xyttmt/learning-rust against try#70daa2c0d8eed7066b07966f3c0b0b8622bff4e4 for pr-151539 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcmplx-xyttmt%2Flearning-rust" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/cmplx-xyttmt/learning-rust [INFO] finished tweaking git repo https://github.com/cmplx-xyttmt/learning-rust [INFO] tweaked toml for git repo https://github.com/cmplx-xyttmt/learning-rust written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/cmplx-xyttmt/learning-rust on toolchain 70daa2c0d8eed7066b07966f3c0b0b8622bff4e4 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/cmplx-xyttmt/learning-rust 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" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "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 num-complex v0.4.2 [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:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5bd7e2f55cf49781b2dfcc5e02c7ca273d294e09e9a2afb6a8cacc6bd4516795 [INFO] running `Command { std: "docker" "start" "-a" "5bd7e2f55cf49781b2dfcc5e02c7ca273d294e09e9a2afb6a8cacc6bd4516795", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5bd7e2f55cf49781b2dfcc5e02c7ca273d294e09e9a2afb6a8cacc6bd4516795", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5bd7e2f55cf49781b2dfcc5e02c7ca273d294e09e9a2afb6a8cacc6bd4516795", kill_on_drop: false }` [INFO] [stdout] 5bd7e2f55cf49781b2dfcc5e02c7ca273d294e09e9a2afb6a8cacc6bd4516795 [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:61361fe0aef631f17e9d025a70c5a647956f8c671dd02950a60ad3f5cc5526d7" "/opt/rustwide/cargo-home/bin/cargo" "+70daa2c0d8eed7066b07966f3c0b0b8622bff4e4" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d6adef46873ae6e1e125699b0768bde5b3cda69264541c14585a475a65327bf3 [INFO] running `Command { std: "docker" "start" "-a" "d6adef46873ae6e1e125699b0768bde5b3cda69264541c14585a475a65327bf3", kill_on_drop: false }` [INFO] [stderr] Compiling num-traits v0.2.15 [INFO] [stderr] Compiling num-integer v0.1.45 [INFO] [stderr] Compiling num-bigint v0.4.3 [INFO] [stderr] Compiling num-rational v0.4.1 [INFO] [stderr] Compiling num-iter v0.1.43 [INFO] [stderr] Checking num-complex v0.4.2 [INFO] [stderr] Checking num v0.4.0 [INFO] [stderr] Checking learning-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] error: could not compile `learning-rust` (bin "rust_safety") due to 1 previous error [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0382]: borrow of moved value: `letters` [INFO] [stdout] --> src/bin/rust_safety.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 28 | let mut letters = vec!["a", "b", "c"]; [INFO] [stdout] | ----------- move occurs because `letters` has type `Vec<&str>`, which does not implement the `Copy` trait [INFO] [stdout] 29 | [INFO] [stdout] 30 | for letter in letters { [INFO] [stdout] | ------- `letters` moved due to this implicit call to `.into_iter()` [INFO] [stdout] 31 | println!("{}", letter); [INFO] [stdout] 32 | letters.push(letter.clone()); // Rust doesn't allow the letters variable to be modified within the iteration block [INFO] [stdout] | ^^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: `into_iter` takes ownership of the receiver `self`, which moves `letters` [INFO] [stdout] --> /rustc/70daa2c0d8eed7066b07966f3c0b0b8622bff4e4/library/core/src/iter/traits/collect.rs:312:17 [INFO] [stdout] help: consider iterating over a slice of the `Vec<&str>`'s content to avoid moving into the `for` loop [INFO] [stdout] | [INFO] [stdout] 30 | for letter in &letters { [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 `learning-rust` (bin "dangling_pointer" test) due to 1 previous error [INFO] [stdout] error[E0382]: borrow of moved value: `grains` [INFO] [stdout] --> src/bin/dangling_pointer.rs:11:22 [INFO] [stdout] | [INFO] [stdout] 8 | let mut grains: Vec = vec![]; // initializes an empty vector of Cereal [INFO] [stdout] | ---------- move occurs because `grains` has type `Vec`, which does not implement the `Copy` trait [INFO] [stdout] 9 | grains.push(Cereal::Rye); [INFO] [stdout] 10 | drop(grains); // Deletes grains and its contents [INFO] [stdout] | ------ value moved here [INFO] [stdout] 11 | println!("{:?}", grains); // Attempts to access the deleted value [INFO] [stdout] | ^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: if `Cereal` implemented `Clone`, you could clone the value [INFO] [stdout] --> src/bin/dangling_pointer.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | enum Cereal { [INFO] [stdout] | ^^^^^^^^^^^ consider implementing `Clone` for this type [INFO] [stdout] ... [INFO] [stdout] 10 | drop(grains); // Deletes grains and its contents [INFO] [stdout] | ------ you could clone this value [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "d6adef46873ae6e1e125699b0768bde5b3cda69264541c14585a475a65327bf3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d6adef46873ae6e1e125699b0768bde5b3cda69264541c14585a475a65327bf3", kill_on_drop: false }` [INFO] [stdout] d6adef46873ae6e1e125699b0768bde5b3cda69264541c14585a475a65327bf3