[INFO] cloning repository https://github.com/rylev/compiler-errors [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/rylev/compiler-errors" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frylev%2Fcompiler-errors", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frylev%2Fcompiler-errors'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d24344c19ba8714dddb18f02d40f023450031121 [INFO] testing rylev/compiler-errors/d24344c19ba8714dddb18f02d40f023450031121 against try#ed7f3d77595b4831fdf085f2529aa13b5b51ff7d for pr-134530 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Frylev%2Fcompiler-errors" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/rylev/compiler-errors on toolchain ed7f3d77595b4831fdf085f2529aa13b5b51ff7d [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ed7f3d77595b4831fdf085f2529aa13b5b51ff7d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/rylev/compiler-errors [INFO] finished tweaking git repo https://github.com/rylev/compiler-errors [INFO] tweaked toml for git repo https://github.com/rylev/compiler-errors written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/rylev/compiler-errors 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" "+ed7f3d77595b4831fdf085f2529aa13b5b51ff7d" "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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+ed7f3d77595b4831fdf085f2529aa13b5b51ff7d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 675e53d006d566451601c72ec757d1f17f7fa1e06a814b6928ec23db7ece75b3 [INFO] running `Command { std: "docker" "start" "-a" "675e53d006d566451601c72ec757d1f17f7fa1e06a814b6928ec23db7ece75b3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "675e53d006d566451601c72ec757d1f17f7fa1e06a814b6928ec23db7ece75b3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "675e53d006d566451601c72ec757d1f17f7fa1e06a814b6928ec23db7ece75b3", kill_on_drop: false }` [INFO] [stdout] 675e53d006d566451601c72ec757d1f17f7fa1e06a814b6928ec23db7ece75b3 [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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+ed7f3d77595b4831fdf085f2529aa13b5b51ff7d" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 37614af8e391dda5d734ace09ad8880130f27dd9c2266f2f0f2beef2d3507192 [INFO] running `Command { std: "docker" "start" "-a" "37614af8e391dda5d734ace09ad8880130f27dd9c2266f2f0f2beef2d3507192", kill_on_drop: false }` [INFO] [stderr] Compiling compiler-errors v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s [INFO] running `Command { std: "docker" "inspect" "37614af8e391dda5d734ace09ad8880130f27dd9c2266f2f0f2beef2d3507192", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "37614af8e391dda5d734ace09ad8880130f27dd9c2266f2f0f2beef2d3507192", kill_on_drop: false }` [INFO] [stdout] 37614af8e391dda5d734ace09ad8880130f27dd9c2266f2f0f2beef2d3507192 [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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+ed7f3d77595b4831fdf085f2529aa13b5b51ff7d" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a0437a7094281316e12d679e7a79334b743713d43039c407c314f6583147cf07 [INFO] running `Command { std: "docker" "start" "-a" "a0437a7094281316e12d679e7a79334b743713d43039c407c314f6583147cf07", kill_on_drop: false }` [INFO] [stderr] Compiling compiler-errors v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0277]: can't compare `&&str` with `str` [INFO] [stdout] --> examples/indirection.rs:5:46 [INFO] [stdout] | [INFO] [stdout] 5 | let found = collection.iter().find(|i| i == item); [INFO] [stdout] | ^^ no implementation for `&&str == str` [INFO] [stdout] | [INFO] [stdout] = help: the trait `PartialEq` is not implemented for `&&str` [INFO] [stdout] = note: required for `&&&str` to implement `PartialEq<&str>` [INFO] [stdout] help: consider dereferencing here [INFO] [stdout] | [INFO] [stdout] 5 | let found = collection.iter().find(|i| **i == item); [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/indirection.rs:6:17 [INFO] [stdout] | [INFO] [stdout] 6 | if let Some("Rust") = found { [INFO] [stdout] | ^^^^^^ ----- this expression has type `Option<&&str>` [INFO] [stdout] | | [INFO] [stdout] | expected `&&str`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&&_` [INFO] [stdout] found reference `&'static _` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0373]: closure may outlive the current function, but it borrows `counter`, which is owned by the current function [INFO] [stdout] --> examples/threaded.rs:5:41 [INFO] [stdout] | [INFO] [stdout] 5 | let handle = std::thread::spawn(|| counter.inc()); [INFO] [stdout] | ^^ ------- `counter` is borrowed here [INFO] [stdout] | | [INFO] [stdout] | may outlive borrowed value `counter` [INFO] [stdout] | [INFO] [stdout] note: function requires argument type to outlive `'static` [INFO] [stdout] --> examples/threaded.rs:5:22 [INFO] [stdout] | [INFO] [stdout] 5 | let handle = std::thread::spawn(|| counter.inc()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] help: to force the closure to take ownership of `counter` (and any other referenced variables), use the `move` keyword [INFO] [stdout] | [INFO] [stdout] 5 | let handle = std::thread::spawn(move || counter.inc()); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `counter` as mutable more than once at a time [INFO] [stdout] --> examples/threaded.rs:5:41 [INFO] [stdout] | [INFO] [stdout] 5 | let handle = std::thread::spawn(|| counter.inc()); [INFO] [stdout] | -------------------^^--------------- [INFO] [stdout] | | | | [INFO] [stdout] | | | borrows occur due to use of `counter` in closure [INFO] [stdout] | | `counter` was mutably borrowed here in the previous iteration of the loop [INFO] [stdout] | argument requires that `counter` is borrowed for `'static` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `counter.n` as immutable because it is also borrowed as mutable [INFO] [stdout] --> examples/threaded.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 5 | let handle = std::thread::spawn(|| counter.inc()); [INFO] [stdout] | ------------------------------------ [INFO] [stdout] | | | | [INFO] [stdout] | | | first borrow occurs due to use of `counter` in closure [INFO] [stdout] | | mutable borrow occurs here [INFO] [stdout] | argument requires that `counter` is borrowed for `'static` [INFO] [stdout] ... [INFO] [stdout] 12 | println!("Count: {}", counter.n) [INFO] [stdout] | ^^^^^^^^^ immutable borrow occurs here [INFO] [stdout] | [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] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0373, E0499, E0502. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0373`. [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[E0004]: non-exhaustive patterns: `Some(&mut Food::Chips)` and `Some(&mut Food::Cake)` not covered [INFO] [stdout] --> examples/lifetime.rs:7:11 [INFO] [stdout] | [INFO] [stdout] 7 | match pantry.iter_mut().find(|f| matches!(f, Food::Avocados(_))) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Some(&mut Food::Chips)` and `Some(&mut Food::Cake)` not covered [INFO] [stdout] | [INFO] [stdout] note: `Option<&mut Food>` defined here [INFO] [stdout] --> /rustc/ed7f3d77595b4831fdf085f2529aa13b5b51ff7d/library/core/src/option.rs:572:1 [INFO] [stdout] ::: /rustc/ed7f3d77595b4831fdf085f2529aa13b5b51ff7d/library/core/src/option.rs:580:5 [INFO] [stdout] | [INFO] [stdout] = note: not covered [INFO] [stdout] = note: the matched value is of type `Option<&mut Food>` [INFO] [stdout] help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms [INFO] [stdout] | [INFO] [stdout] 12~ None => pantry.push(Food::Cake), [INFO] [stdout] 13~ Some(&mut Food::Chips) | Some(&mut Food::Cake) => todo!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of partially moved value: `ryan` [INFO] [stdout] --> examples/move.rs:9:19 [INFO] [stdout] | [INFO] [stdout] 7 | let name = ryan.name; [INFO] [stdout] | --------- value partially moved here [INFO] [stdout] 8 | println!("My name is {name}"); [INFO] [stdout] 9 | print_hobbies(ryan); [INFO] [stdout] | ^^^^ value used here after partial move [INFO] [stdout] | [INFO] [stdout] = note: partial move occurs because `ryan.name` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `ryan` [INFO] [stdout] --> examples/move.rs:10:30 [INFO] [stdout] | [INFO] [stdout] 2 | let ryan = Person { [INFO] [stdout] | ---- move occurs because `ryan` has type `Person`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 9 | print_hobbies(ryan); [INFO] [stdout] | ---- value moved here [INFO] [stdout] 10 | println!("My age is {}", ryan.age); [INFO] [stdout] | ^^^^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in function `print_hobbies` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> examples/move.rs:13:26 [INFO] [stdout] | [INFO] [stdout] 13 | fn print_hobbies(person: Person) { [INFO] [stdout] | ------------- ^^^^^^ this parameter takes ownership of the value [INFO] [stdout] | | [INFO] [stdout] | in this function [INFO] [stdout] note: if `Person` implemented `Clone`, you could clone the value [INFO] [stdout] --> examples/move.rs:20:1 [INFO] [stdout] | [INFO] [stdout] 9 | print_hobbies(ryan); [INFO] [stdout] | ---- you could clone this value [INFO] [stdout] ... [INFO] [stdout] 20 | struct Person { [INFO] [stdout] | ^^^^^^^^^^^^^ consider implementing `Clone` for this type [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] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0004`. [INFO] [stdout] [INFO] [stderr] error: could not compile `compiler-errors` (example "threaded") due to 3 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] For more information about this error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `compiler-errors` (example "indirection") due to 2 previous errors [INFO] [stderr] error: could not compile `compiler-errors` (example "lifetime") due to 1 previous error [INFO] [stderr] error: could not compile `compiler-errors` (example "move") due to 2 previous errors [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> examples/cow.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 6 | let url = if url.starts_with("https://") { [INFO] [stdout] | _______________- [INFO] [stdout] 7 | | url [INFO] [stdout] | | --- expected because of this [INFO] [stdout] 8 | | } else { [INFO] [stdout] 9 | | format!("https://example.com{url}") [INFO] [stdout] | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&str`, found `String` [INFO] [stdout] 10 | | }; [INFO] [stdout] | |_____- `if` and `else` have incompatible types [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `method` [INFO] [stdout] --> examples/cow.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | fn make_request(method: Method, url: String) { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_method` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `url` [INFO] [stdout] --> examples/cow.rs:14:33 [INFO] [stdout] | [INFO] [stdout] 14 | fn make_request(method: Method, url: String) { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_url` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error: future cannot be sent between threads safely [INFO] [stdout] --> examples/async.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | / spawn(async { [INFO] [stdout] 5 | | let mut scores = UserScore(Mutex::new(HashMap::new())); [INFO] [stdout] 6 | | scores.increment("Ryan").await; [INFO] [stdout] 7 | | }) [INFO] [stdout] | |______^ future created by async block is not `Send` [INFO] [stdout] | [INFO] [stdout] = help: within `{async block@examples/async.rs:4:11: 4:16}`, the trait `Send` is not implemented for `MutexGuard<'_, HashMap>` [INFO] [stdout] note: future is not `Send` as this value is used across an await [INFO] [stdout] --> examples/async.rs:16:29 [INFO] [stdout] | [INFO] [stdout] 14 | let mut scores = self.0.lock().unwrap(); [INFO] [stdout] | ---------- has type `MutexGuard<'_, HashMap>` which is not `Send` [INFO] [stdout] 15 | let score = scores.entry(name.to_owned()).or_default(); [INFO] [stdout] 16 | store(name, *score).await; [INFO] [stdout] | ^^^^^ await occurs here, with `mut scores` maybe used later [INFO] [stdout] note: required by a bound in `spawn` [INFO] [stdout] --> examples/async.rs:27:17 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn spawn(_future: T) [INFO] [stdout] | ----- required by a bound in this function [INFO] [stdout] 26 | where [INFO] [stdout] 27 | T: Future + Send + 'static, [INFO] [stdout] | ^^^^ required by this bound in `spawn` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `compiler-errors` (example "cow") due to 1 previous error; 2 warnings emitted [INFO] [stderr] error: could not compile `compiler-errors` (example "async") due to 1 previous error [INFO] running `Command { std: "docker" "inspect" "a0437a7094281316e12d679e7a79334b743713d43039c407c314f6583147cf07", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a0437a7094281316e12d679e7a79334b743713d43039c407c314f6583147cf07", kill_on_drop: false }` [INFO] [stdout] a0437a7094281316e12d679e7a79334b743713d43039c407c314f6583147cf07