[INFO] cloning repository https://github.com/benjcollins/compiler2 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/benjcollins/compiler2" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenjcollins%2Fcompiler2", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenjcollins%2Fcompiler2'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8dad9c335ab40f3baeffc1e2b64152741f0b7f45 [INFO] building benjcollins/compiler2 against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbenjcollins%2Fcompiler2" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/benjcollins/compiler2 on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/benjcollins/compiler2 [INFO] finished tweaking git repo https://github.com/benjcollins/compiler2 [INFO] tweaked toml for git repo https://github.com/benjcollins/compiler2 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/benjcollins/compiler2 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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9aa7e3509a0cf3f1705b4359d3c11b11a67346a6e80730f44a0a387f3466b3d4 [INFO] running `Command { std: "docker" "start" "-a" "9aa7e3509a0cf3f1705b4359d3c11b11a67346a6e80730f44a0a387f3466b3d4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9aa7e3509a0cf3f1705b4359d3c11b11a67346a6e80730f44a0a387f3466b3d4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9aa7e3509a0cf3f1705b4359d3c11b11a67346a6e80730f44a0a387f3466b3d4", kill_on_drop: false }` [INFO] [stdout] 9aa7e3509a0cf3f1705b4359d3c11b11a67346a6e80730f44a0a387f3466b3d4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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 -Dtail-expr-drop-order" "-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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] df3bf0015b0140585c0289b9c76dee8141acfa9818742e2db059f201398127a9 [INFO] running `Command { std: "docker" "start" "-a" "df3bf0015b0140585c0289b9c76dee8141acfa9818742e2db059f201398127a9", kill_on_drop: false }` [INFO] [stderr] Compiling compiler v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected `;`, found `scope` [INFO] [stdout] --> src/types.rs:26:43 [INFO] [stdout] | [INFO] [stdout] 26 | unify_types(ty, b) [INFO] [stdout] | ^ help: add `;` here [INFO] [stdout] 27 | scope.insert(ident, Rc::new(RefCell::new(ty))); [INFO] [stdout] | ----- unexpected token [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/types.rs:58:19 [INFO] [stdout] | [INFO] [stdout] 58 | TupleIter(Iter>), [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: consider using the `'a` lifetime [INFO] [stdout] | [INFO] [stdout] 58 | TupleIter(Iter<'a, Expr<'a>>), [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `scope` in this scope [INFO] [stdout] --> src/types.rs:70:28 [INFO] [stdout] | [INFO] [stdout] 70 | type_of_expr(expr, scope); [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use std::thread::scope; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `match` arms have incompatible types [INFO] [stdout] --> src/types.rs:68:37 [INFO] [stdout] | [INFO] [stdout] 66 | let expr = match self { [INFO] [stdout] | ____________________- [INFO] [stdout] 67 | | TypeIter::TupleIter(iter) => iter.next(), [INFO] [stdout] | | ----------- this is found to be of type `Option<&Expr<'_>>` [INFO] [stdout] 68 | | TypeIter::Once(once) => once.next(), [INFO] [stdout] | | ^^^^^^^^^^^ expected `Option<&Expr<'_>>`, found `Option>` [INFO] [stdout] 69 | | }?; [INFO] [stdout] | |_________- `match` arms have incompatible types [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option<&Expr<'_>>` [INFO] [stdout] found enum `Option>` [INFO] [stdout] help: try using `.as_ref()` to convert `Option>` to `Option<&Expr<'_>>` [INFO] [stdout] | [INFO] [stdout] 68 | TypeIter::Once(once) => once.next().as_ref(), [INFO] [stdout] | +++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/types.rs:65:27 [INFO] [stdout] | [INFO] [stdout] 65 | fn next(&mut self) -> Option { [INFO] [stdout] | ---- ^^^^^^^^^^^^^^^^^^ expected `Option>>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option>>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `scope::Scope<'_>` doesn't implement `Debug` [INFO] [stdout] --> src/main.rs:15:23 [INFO] [stdout] | [INFO] [stdout] 15 | println!("{:#?}", scope); [INFO] [stdout] | ^^^^^ `scope::Scope<'_>` cannot be formatted using `{:?}` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Debug` is not implemented for `scope::Scope<'_>` [INFO] [stdout] = note: add `#[derive(Debug)]` to `scope::Scope<'_>` or manually `impl Debug for scope::Scope<'_>` [INFO] [stdout] = help: the trait `Debug` is implemented for `Result` [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] error[E0596]: cannot borrow `rets` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/parser/mod.rs:184:13 [INFO] [stdout] | [INFO] [stdout] 184 | let rets = vec![]; [INFO] [stdout] | ^^^^ not mutable [INFO] [stdout] 185 | if self.try_consume_symbol("->") { [INFO] [stdout] 186 | rets.push(self.parse_type()); [INFO] [stdout] | ---- cannot borrow as mutable [INFO] [stdout] 187 | while self.try_consume_symbol(",") { [INFO] [stdout] 188 | rets.push(self.parse_type()) [INFO] [stdout] | ---- cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 184 | let mut rets = vec![]; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/types.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 103 | _ => Err(()), [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] note: multiple earlier patterns match some of the same values [INFO] [stdout] --> src/types.rs:103:9 [INFO] [stdout] | [INFO] [stdout] 92 | (_, Type::Unknown) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 97 | (Type::Unknown, _) => { [INFO] [stdout] | ------------------ matches some of the same values [INFO] [stdout] ... [INFO] [stdout] 102 | (Type::Int, Type::Int) => Ok(()), [INFO] [stdout] | ---------------------- matches some of the same values [INFO] [stdout] 103 | _ => Err(()), [INFO] [stdout] | ^ collectively making this unreachable [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `*a` which is behind a mutable reference [INFO] [stdout] --> src/types.rs:93:18 [INFO] [stdout] | [INFO] [stdout] 93 | *b = *a; [INFO] [stdout] | ^^ move occurs because `*a` has type `types::Type`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 93 - *b = *a; [INFO] [stdout] 93 + *b = a.clone(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `a` [INFO] [stdout] --> src/types.rs:93:18 [INFO] [stdout] | [INFO] [stdout] 89 | fn unify_types(a: &mut Type, b: &mut Type) -> Result<(), ()> { [INFO] [stdout] | - move occurs because `a` has type `&mut types::Type`, which does not implement the `Copy` trait [INFO] [stdout] 90 | match (a, b) { [INFO] [stdout] | - value moved here [INFO] [stdout] ... [INFO] [stdout] 93 | *b = *a; [INFO] [stdout] | ^^ value used here after move [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `*b` which is behind a mutable reference [INFO] [stdout] --> src/types.rs:98:18 [INFO] [stdout] | [INFO] [stdout] 98 | *a = *b; [INFO] [stdout] | ^^ move occurs because `*b` has type `types::Type`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 98 - *a = *b; [INFO] [stdout] 98 + *a = b.clone(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: use of moved value: `b` [INFO] [stdout] --> src/types.rs:98:18 [INFO] [stdout] | [INFO] [stdout] 89 | fn unify_types(a: &mut Type, b: &mut Type) -> Result<(), ()> { [INFO] [stdout] | - move occurs because `b` has type `&mut types::Type`, which does not implement the `Copy` trait [INFO] [stdout] 90 | match (a, b) { [INFO] [stdout] | - value moved here [INFO] [stdout] ... [INFO] [stdout] 98 | *a = *b; [INFO] [stdout] | ^^ value used here after move [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.head` which is behind a mutable reference [INFO] [stdout] --> src/scope.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 23 | prev: self.head [INFO] [stdout] | ^^^^^^^^^ move occurs because `self.head` has type `Option>>`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 23 | prev: self.head.clone() [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of `self.head` which is behind a shared reference [INFO] [stdout] --> src/scope.rs:27:20 [INFO] [stdout] | [INFO] [stdout] 27 | let node = self.head?; [INFO] [stdout] | ^^^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | `self.head` moved due to this method call [INFO] [stdout] | move occurs because `self.head` has type `Option>>`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] note: `branch` takes ownership of the receiver `self`, which moves `self.head` [INFO] [stdout] --> /rustc/11663cd3bfefef7d34e8f0892c250bf698049392/library/core/src/ops/try_trait.rs:217:15 [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 27 | let node = >> as Clone>::clone(&self.head)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 27 | let node = self.head.clone()?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return value referencing local variable `node` [INFO] [stdout] --> src/scope.rs:30:24 [INFO] [stdout] | [INFO] [stdout] 30 | return Some(&node.ty) [INFO] [stdout] | ^^^^^^----^^^^ [INFO] [stdout] | | | [INFO] [stdout] | | `node` is borrowed here [INFO] [stdout] | returns a value referencing data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `node` [INFO] [stdout] --> src/scope.rs:32:13 [INFO] [stdout] | [INFO] [stdout] 27 | let node = self.head?; [INFO] [stdout] | ---- first assignment to `node` [INFO] [stdout] ... [INFO] [stdout] 32 | node = node.prev?; [INFO] [stdout] | ^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 27 | let mut node = self.head?; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0507]: cannot move out of an `Rc` [INFO] [stdout] --> src/scope.rs:32:20 [INFO] [stdout] | [INFO] [stdout] 32 | node = node.prev?; [INFO] [stdout] | ^^^^^^^^^- [INFO] [stdout] | | [INFO] [stdout] | value moved due to this method call [INFO] [stdout] | move occurs because value has type `Option>>`, which does not implement the `Copy` trait [INFO] [stdout] | [INFO] [stdout] help: you can `clone` the value and consume it, but this might not be your desired behavior [INFO] [stdout] | [INFO] [stdout] 32 | node = >> as Clone>::clone(&node.prev)?; [INFO] [stdout] | ++++++++++++++++++++++++++++++++++++++++ + [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 32 | node = node.prev.clone()?; [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0106, E0277, E0308, E0382, E0384, E0425, E0507, E0515, E0596. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0106`. [INFO] [stdout] [INFO] [stderr] error: could not compile `compiler` (bin "compiler") due to 16 previous errors; 1 warning emitted [INFO] running `Command { std: "docker" "inspect" "df3bf0015b0140585c0289b9c76dee8141acfa9818742e2db059f201398127a9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "df3bf0015b0140585c0289b9c76dee8141acfa9818742e2db059f201398127a9", kill_on_drop: false }` [INFO] [stdout] df3bf0015b0140585c0289b9c76dee8141acfa9818742e2db059f201398127a9