[INFO] cloning repository https://github.com/figgyfigs/rust-practice [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/figgyfigs/rust-practice" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffiggyfigs%2Frust-practice", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffiggyfigs%2Frust-practice'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 4426331dee017ab9304be1bb41ab8be66d3f617b [INFO] checking figgyfigs/rust-practice against master#dfd7b8d03fb93d0e03147d28b3be6d93260fa94d for pr-87050 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffiggyfigs%2Frust-practice" "/workspace/builds/worker-4/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/figgyfigs/rust-practice on toolchain dfd7b8d03fb93d0e03147d28b3be6d93260fa94d [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/figgyfigs/rust-practice [INFO] finished tweaking git repo https://github.com/figgyfigs/rust-practice [INFO] tweaked toml for git repo https://github.com/figgyfigs/rust-practice written to /workspace/builds/worker-4/source/Cargo.toml [INFO] crate git repo https://github.com/figgyfigs/rust-practice already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] ff58e6372d314ea21ba1c780fd0d425d38788f607cf917f03560199f4ffb95c5 [INFO] running `Command { std: "docker" "start" "-a" "ff58e6372d314ea21ba1c780fd0d425d38788f607cf917f03560199f4ffb95c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ff58e6372d314ea21ba1c780fd0d425d38788f607cf917f03560199f4ffb95c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ff58e6372d314ea21ba1c780fd0d425d38788f607cf917f03560199f4ffb95c5", kill_on_drop: false }` [INFO] [stdout] ff58e6372d314ea21ba1c780fd0d425d38788f607cf917f03560199f4ffb95c5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4/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" "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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+dfd7b8d03fb93d0e03147d28b3be6d93260fa94d" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7855f11411ef517289d134bef8c543ff61f31787da07608cd60f5af48c1c51e9 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "7855f11411ef517289d134bef8c543ff61f31787da07608cd60f5af48c1c51e9", kill_on_drop: false }` [INFO] [stderr] Checking company_directory v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0428]: the name `main` is defined multiple times [INFO] [stdout] --> src/main.rs:127:1 [INFO] [stdout] | [INFO] [stdout] 19 | fn main() { [INFO] [stdout] | --------- previous definition of the value `main` here [INFO] [stdout] ... [INFO] [stdout] 127 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `main` redefined here [INFO] [stdout] | [INFO] [stdout] = note: `main` must be defined only once in the value namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0428]: the name `add_employee` is defined multiple times [INFO] [stdout] --> src/main.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 94 | fn add_employee(departments: &mut HashMap>) { [INFO] [stdout] | --------------------------------------------------------------- previous definition of the value `add_employee` here [INFO] [stdout] ... [INFO] [stdout] 144 | fn add_employee(mut hashmap: HashMap>) -> HashMap> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `add_employee` redefined here [INFO] [stdout] | [INFO] [stdout] = note: `add_employee` must be defined only once in the value namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `HashMap` is defined multiple times [INFO] [stdout] --> src/main.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::collections::HashMap; [INFO] [stdout] | ------------------------- previous import of the type `HashMap` here [INFO] [stdout] ... [INFO] [stdout] 124 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ `HashMap` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `HashMap` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `io` is defined multiple times [INFO] [stdout] --> src/main.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::io; [INFO] [stdout] | ------- previous import of the module `io` here [INFO] [stdout] ... [INFO] [stdout] 125 | use std::io; [INFO] [stdout] | ^^^^^^^ `io` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `io` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 124 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0428]: the name `main` is defined multiple times [INFO] [stdout] --> src/main.rs:127:1 [INFO] [stdout] | [INFO] [stdout] 19 | fn main() { [INFO] [stdout] | --------- previous definition of the value `main` here [INFO] [stdout] ... [INFO] [stdout] 127 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `main` redefined here [INFO] [stdout] | [INFO] [stdout] = note: `main` must be defined only once in the value namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0428]: the name `add_employee` is defined multiple times [INFO] [stdout] --> src/main.rs:144:1 [INFO] [stdout] | [INFO] [stdout] 94 | fn add_employee(departments: &mut HashMap>) { [INFO] [stdout] | --------------------------------------------------------------- previous definition of the value `add_employee` here [INFO] [stdout] ... [INFO] [stdout] 144 | fn add_employee(mut hashmap: HashMap>) -> HashMap> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `add_employee` redefined here [INFO] [stdout] | [INFO] [stdout] = note: `add_employee` must be defined only once in the value namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `HashMap` is defined multiple times [INFO] [stdout] --> src/main.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::collections::HashMap; [INFO] [stdout] | ------------------------- previous import of the type `HashMap` here [INFO] [stdout] ... [INFO] [stdout] 124 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ `HashMap` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `HashMap` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0252]: the name `io` is defined multiple times [INFO] [stdout] --> src/main.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::io; [INFO] [stdout] | ------- previous import of the module `io` here [INFO] [stdout] ... [INFO] [stdout] 125 | use std::io; [INFO] [stdout] | ^^^^^^^ `io` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `io` must be defined only once in the type namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io` [INFO] [stdout] --> src/main.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | use std::io; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/main.rs:124:5 [INFO] [stdout] | [INFO] [stdout] 124 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io` [INFO] [stdout] --> src/main.rs:125:5 [INFO] [stdout] | [INFO] [stdout] 125 | use std::io; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:48:55 [INFO] [stdout] | [INFO] [stdout] 48 | Some(OpCode::AddEmployee) => add_employee(&mut departments), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ expected struct `String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected mutable reference `&mut HashMap>` [INFO] [stdout] found mutable reference `&mut HashMap>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:48:55 [INFO] [stdout] | [INFO] [stdout] 48 | Some(OpCode::AddEmployee) => add_employee(&mut departments), [INFO] [stdout] | ^^^^^^^^^^^^^^^^ expected struct `String`, found `&str` [INFO] [stdout] | [INFO] [stdout] = note: expected mutable reference `&mut HashMap>` [INFO] [stdout] found mutable reference `&mut HashMap>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:112:57 [INFO] [stdout] | [INFO] [stdout] 112 | departments.insert(department_name.to_owned(), vec![employee_name]); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected struct `String`, found `&str` [INFO] [stdout] | help: try using a conversion method: `employee_name.to_string()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:137:30 [INFO] [stdout] | [INFO] [stdout] 137 | departments = add_employee(departments); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected mutable reference, found struct `HashMap` [INFO] [stdout] | help: consider mutably borrowing here: `&mut departments` [INFO] [stdout] | [INFO] [stdout] = note: expected mutable reference `&mut HashMap>` [INFO] [stdout] found struct `HashMap>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:137:17 [INFO] [stdout] | [INFO] [stdout] 137 | departments = add_employee(departments); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `HashMap`, found `()` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `HashMap>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 8 previous errors; 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0252, E0308, E0428. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0252`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:112:57 [INFO] [stdout] | [INFO] [stdout] 112 | departments.insert(department_name.to_owned(), vec![employee_name]); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected struct `String`, found `&str` [INFO] [stdout] | help: try using a conversion method: `employee_name.to_string()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:137:30 [INFO] [stdout] | [INFO] [stdout] 137 | departments = add_employee(departments); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected mutable reference, found struct `HashMap` [INFO] [stdout] | help: consider mutably borrowing here: `&mut departments` [INFO] [stdout] | [INFO] [stdout] = note: expected mutable reference `&mut HashMap>` [INFO] [stdout] found struct `HashMap>` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `company_directory` [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:137:17 [INFO] [stdout] | [INFO] [stdout] 137 | departments = add_employee(departments); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `HashMap`, found `()` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `HashMap>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 8 previous errors; 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0252, E0308, E0428. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0252`. [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "7855f11411ef517289d134bef8c543ff61f31787da07608cd60f5af48c1c51e9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7855f11411ef517289d134bef8c543ff61f31787da07608cd60f5af48c1c51e9", kill_on_drop: false }` [INFO] [stdout] 7855f11411ef517289d134bef8c543ff61f31787da07608cd60f5af48c1c51e9