[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 try#b83b707f97d809763b7861afa7638871f3339a33 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-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/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-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/hahainong/rust_day4 on toolchain b83b707f97d809763b7861afa7638871f3339a33 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "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" "+b83b707f97d809763b7861afa7638871f3339a33" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] eb91635462316144bdcd73ce91d3b99e8f85e6dd0d0519a28f5b4b0dcc351422 [INFO] running `Command { std: "docker" "start" "-a" "eb91635462316144bdcd73ce91d3b99e8f85e6dd0d0519a28f5b4b0dcc351422", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "eb91635462316144bdcd73ce91d3b99e8f85e6dd0d0519a28f5b4b0dcc351422", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "eb91635462316144bdcd73ce91d3b99e8f85e6dd0d0519a28f5b4b0dcc351422", kill_on_drop: false }` [INFO] [stdout] eb91635462316144bdcd73ce91d3b99e8f85e6dd0d0519a28f5b4b0dcc351422 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+b83b707f97d809763b7861afa7638871f3339a33" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 247174733d26ea86b093ef0201977db7b3933df2e1ae4ca8916aa3eb74faf7e3 [INFO] running `Command { std: "docker" "start" "-a" "247174733d26ea86b093ef0201977db7b3933df2e1ae4ca8916aa3eb74faf7e3", 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] [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] [stderr] error: could not compile `rust_day4` (bin "rust_day4") due to 3 previous errors; 1 warning emitted [INFO] running `Command { std: "docker" "inspect" "247174733d26ea86b093ef0201977db7b3933df2e1ae4ca8916aa3eb74faf7e3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "247174733d26ea86b093ef0201977db7b3933df2e1ae4ca8916aa3eb74faf7e3", kill_on_drop: false }` [INFO] [stdout] 247174733d26ea86b093ef0201977db7b3933df2e1ae4ca8916aa3eb74faf7e3