[INFO] cloning repository https://github.com/Falvyu/rust-calc [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Falvyu/rust-calc" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFalvyu%2Frust-calc", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFalvyu%2Frust-calc'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b7a3238dddb908d8582ac71d5d21999255a49394 [INFO] checking Falvyu/rust-calc/b7a3238dddb908d8582ac71d5d21999255a49394 against master#f609b7e0586f81fefb3523e3e17adf779ac416be for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFalvyu%2Frust-calc" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Falvyu/rust-calc on toolchain f609b7e0586f81fefb3523e3e17adf779ac416be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/Falvyu/rust-calc [INFO] finished tweaking git repo https://github.com/Falvyu/rust-calc [INFO] tweaked toml for git repo https://github.com/Falvyu/rust-calc written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/Falvyu/rust-calc 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" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c82052130bf2fb518ce2182e1e41df93af935c36b017f57af5d182a57a440101 [INFO] running `Command { std: "docker" "start" "-a" "c82052130bf2fb518ce2182e1e41df93af935c36b017f57af5d182a57a440101", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c82052130bf2fb518ce2182e1e41df93af935c36b017f57af5d182a57a440101", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c82052130bf2fb518ce2182e1e41df93af935c36b017f57af5d182a57a440101", kill_on_drop: false }` [INFO] [stdout] c82052130bf2fb518ce2182e1e41df93af935c36b017f57af5d182a57a440101 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 5b79343052da8ed4bf909e50e3024ec2430e2e630026209d0118b3f35cf4835e [INFO] running `Command { std: "docker" "start" "-a" "5b79343052da8ed4bf909e50e3024ec2430e2e630026209d0118b3f35cf4835e", kill_on_drop: false }` [INFO] [stderr] Checking calc v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `infix` [INFO] [stdout] --> src/ast.rs:135:27 [INFO] [stdout] | [INFO] [stdout] 135 | fn push_op(&self, infix: &mut Vec>) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_infix` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `x` is never read [INFO] [stdout] --> src/main.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub struct Number { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 12 | x: i32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Number` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fibonacci` is never used [INFO] [stdout] --> src/main.rs:41:4 [INFO] [stdout] | [INFO] [stdout] 41 | fn fibonacci(n: i32) -> i32{ [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `UnknownError` is never constructed [INFO] [stdout] --> src/ast.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 8 | pub enum CalcError { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 9 | NotEnoughArguments, [INFO] [stdout] 10 | UnknownError, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CalcError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `calc` is never used [INFO] [stdout] --> src/ast.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn calc(op: Rc) -> Result { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `calc` and `push_op` are never used [INFO] [stdout] --> src/ast.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 43 | pub trait Operation { [INFO] [stdout] | --------- methods in this trait [INFO] [stdout] 44 | fn calc(&self, args: &mut Vec) -> Result; [INFO] [stdout] | ^^^^ [INFO] [stdout] 45 | [INFO] [stdout] 46 | fn push_op(&self, infix: &mut Vec>); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ast.rs:163:33 [INFO] [stdout] | [INFO] [stdout] 163 | left: Rc::clone(&n1), [INFO] [stdout] | --------- ^^^ expected `&Rc`, found `&Rc` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&std::rc::Rc` [INFO] [stdout] found reference `&std::rc::Rc` [INFO] [stdout] = help: `ast::ast::Number` implements `Operation` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/f609b7e0586f81fefb3523e3e17adf779ac416be/library/core/src/clone.rs:165:8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ast.rs:164:34 [INFO] [stdout] | [INFO] [stdout] 164 | right: Rc::clone(&n2) [INFO] [stdout] | --------- ^^^ expected `&Rc`, found `&Rc` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&std::rc::Rc` [INFO] [stdout] found reference `&std::rc::Rc` [INFO] [stdout] = help: `ast::ast::Number` implements `Operation` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/f609b7e0586f81fefb3523e3e17adf779ac416be/library/core/src/clone.rs:165:8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ast.rs:169:33 [INFO] [stdout] | [INFO] [stdout] 169 | left: Rc::clone(&a1), [INFO] [stdout] | --------- ^^^ expected `&Rc`, found `&Rc` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&std::rc::Rc` [INFO] [stdout] found reference `&std::rc::Rc` [INFO] [stdout] = help: `ast::ast::Add` implements `Operation` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/f609b7e0586f81fefb3523e3e17adf779ac416be/library/core/src/clone.rs:165:8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/ast.rs:170:34 [INFO] [stdout] | [INFO] [stdout] 170 | right: Rc::clone(&n3) [INFO] [stdout] | --------- ^^^ expected `&Rc`, found `&Rc` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&std::rc::Rc` [INFO] [stdout] found reference `&std::rc::Rc` [INFO] [stdout] = help: `ast::ast::Number` implements `Operation` so you could box the found value and coerce it to the trait object `Box`, you will have to change the expected type as well [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/f609b7e0586f81fefb3523e3e17adf779ac416be/library/core/src/clone.rs:165:8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `infix` [INFO] [stdout] --> src/ast.rs:135:27 [INFO] [stdout] | [INFO] [stdout] 135 | fn push_op(&self, infix: &mut Vec>) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_infix` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `expected` [INFO] [stdout] --> src/main.rs:112:13 [INFO] [stdout] | [INFO] [stdout] 112 | let expected: Vec> = vec![ [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_expected` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result1` [INFO] [stdout] --> src/main.rs:120:13 [INFO] [stdout] | [INFO] [stdout] 120 | let result1 = parse("2 + 2 * 3"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result2` [INFO] [stdout] --> src/main.rs:121:13 [INFO] [stdout] | [INFO] [stdout] 121 | let result2 = parse("2+2*3"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result3` [INFO] [stdout] --> src/main.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 122 | let result3 = parse("2+2*6"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `result4` [INFO] [stdout] --> src/main.rs:123:13 [INFO] [stdout] | [INFO] [stdout] 123 | let result4 = parse("2+2*66"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_result4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors; 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `calc` (bin "calc" test) due to 5 previous errors; 6 warnings emitted [INFO] running `Command { std: "docker" "inspect" "5b79343052da8ed4bf909e50e3024ec2430e2e630026209d0118b3f35cf4835e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5b79343052da8ed4bf909e50e3024ec2430e2e630026209d0118b3f35cf4835e", kill_on_drop: false }` [INFO] [stdout] 5b79343052da8ed4bf909e50e3024ec2430e2e630026209d0118b3f35cf4835e