[INFO] cloning repository https://github.com/hahainong/rust_day4 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/hahainong/rust_day4" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhahainong%2Frust_day4", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhahainong%2Frust_day4'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f49eba890883cb475ec55171fc1babb03c3f4953 [INFO] testing hahainong/rust_day4 against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhahainong%2Frust_day4" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/hahainong/rust_day4 [INFO] finished tweaking git repo https://github.com/hahainong/rust_day4 [INFO] tweaked toml for git repo https://github.com/hahainong/rust_day4 written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/hahainong/rust_day4 on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/hahainong/rust_day4 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" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "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-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c8d6881e3ab2639c207e430c6a66b509f4cab7523609d16e294029d15617105c [INFO] running `Command { std: "docker" "start" "-a" "c8d6881e3ab2639c207e430c6a66b509f4cab7523609d16e294029d15617105c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c8d6881e3ab2639c207e430c6a66b509f4cab7523609d16e294029d15617105c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c8d6881e3ab2639c207e430c6a66b509f4cab7523609d16e294029d15617105c", kill_on_drop: false }` [INFO] [stdout] c8d6881e3ab2639c207e430c6a66b509f4cab7523609d16e294029d15617105c [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 55a212015df4768e850a361e5a27f033d5d53339f19561c45ca8c5df65c89917 [INFO] running `Command { std: "docker" "start" "-a" "55a212015df4768e850a361e5a27f033d5d53339f19561c45ca8c5df65c89917", kill_on_drop: false }` [INFO] [stderr] Compiling rust_day4 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0601]: `main` function not found in crate `rust_day4` [INFO] [stdout] --> src/main.rs:242:2 [INFO] [stdout] | [INFO] [stdout] 242 | } [INFO] [stdout] | ^ consider adding a `main` function to `src/main.rs` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_day4` (bin "rust_day4") due to 3 previous errors; 1 warning emitted [INFO] [stdout] error[E0053]: method `total_price` has an incompatible type for trait [INFO] [stdout] --> src/main.rs:170:20 [INFO] [stdout] | [INFO] [stdout] 170 | fn total_price(&mut self, shopping_list: &[&str]) -> Option { [INFO] [stdout] | ^^^^^^^^^ types differ in mutability [INFO] [stdout] | [INFO] [stdout] note: type in trait [INFO] [stdout] --> src/main.rs:126:20 [INFO] [stdout] | [INFO] [stdout] 126 | fn total_price(&self, shopping_list: &[&str]) -> Option { [INFO] [stdout] | ^^^^^ [INFO] [stdout] = note: expected signature `fn(&Store, &[&str]) -> Option<_>` [INFO] [stdout] found signature `fn(&mut Store, &[&str]) -> Option<_>` [INFO] [stdout] help: change the self-receiver type to match the trait [INFO] [stdout] | [INFO] [stdout] 170 - fn total_price(&mut self, shopping_list: &[&str]) -> Option { [INFO] [stdout] 170 + fn total_price(&self, shopping_list: &[&str]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:171:9 [INFO] [stdout] | [INFO] [stdout] 170 | fn total_price(&mut self, shopping_list: &[&str]) -> Option { [INFO] [stdout] | ----------- expected `Option` because of return type [INFO] [stdout] 171 | / for item in &self.items { [INFO] [stdout] 172 | | [INFO] [stdout] 173 | | } [INFO] [stdout] | |_________^ expected `Option`, found `()` [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found unit type `()` [INFO] [stdout] = note: `for` loops evaluate to unit type `()` [INFO] [stdout] help: try adding an expression at the end of the block [INFO] [stdout] | [INFO] [stdout] 173 ~ } [INFO] [stdout] 174 + None [INFO] [stdout] | [INFO] [stdout] 173 ~ } [INFO] [stdout] 174 + Some(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `shopping_list` [INFO] [stdout] --> src/main.rs:126:27 [INFO] [stdout] | [INFO] [stdout] 126 | fn total_price(&self, shopping_list: &[&str]) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_shopping_list` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0053, E0308, E0601. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0053`. [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "55a212015df4768e850a361e5a27f033d5d53339f19561c45ca8c5df65c89917", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "55a212015df4768e850a361e5a27f033d5d53339f19561c45ca8c5df65c89917", kill_on_drop: false }` [INFO] [stdout] 55a212015df4768e850a361e5a27f033d5d53339f19561c45ca8c5df65c89917