[INFO] cloning repository https://github.com/vannyakh/hello_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/vannyakh/hello_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvannyakh%2Fhello_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvannyakh%2Fhello_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 592d04dc951fcf05413186ee58709bcca538472b [INFO] testing vannyakh/hello_rust against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fvannyakh%2Fhello_rust" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/vannyakh/hello_rust [INFO] finished tweaking git repo https://github.com/vannyakh/hello_rust [INFO] tweaked toml for git repo https://github.com/vannyakh/hello_rust written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/vannyakh/hello_rust 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/vannyakh/hello_rust 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 390bee54fe4a301249a9c0bd2e5be4d1fc775c0b090341f0b047643cef8c1a46 [INFO] running `Command { std: "docker" "start" "-a" "390bee54fe4a301249a9c0bd2e5be4d1fc775c0b090341f0b047643cef8c1a46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "390bee54fe4a301249a9c0bd2e5be4d1fc775c0b090341f0b047643cef8c1a46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "390bee54fe4a301249a9c0bd2e5be4d1fc775c0b090341f0b047643cef8c1a46", kill_on_drop: false }` [INFO] [stdout] 390bee54fe4a301249a9c0bd2e5be4d1fc775c0b090341f0b047643cef8c1a46 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] d96f47d691dfacf3e151105e86aff22685fb7694cf009385fc01a501acaae398 [INFO] running `Command { std: "docker" "start" "-a" "d96f47d691dfacf3e151105e86aff22685fb7694cf009385fc01a501acaae398", kill_on_drop: false }` [INFO] [stderr] Compiling hello_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0428]: the name `first_word` is defined multiple times [INFO] [stdout] --> src/main.rs:402:1 [INFO] [stdout] | [INFO] [stdout] 392 | fn first_word(s: &String) -> &str { [INFO] [stdout] | --------------------------------- previous definition of the value `first_word` here [INFO] [stdout] ... [INFO] [stdout] 402 | fn first_word(s: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `first_word` redefined here [INFO] [stdout] | [INFO] [stdout] = note: `first_word` must be defined only once in the value namespace of this module [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `IpAddr` in this scope [INFO] [stdout] --> src/main.rs:193:16 [INFO] [stdout] | [INFO] [stdout] 193 | let home = IpAddr { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `IpAddr` in this scope [INFO] [stdout] --> src/main.rs:197:20 [INFO] [stdout] | [INFO] [stdout] 197 | let loopback = IpAddr { [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `area` found for struct `Rectangle` in the current scope [INFO] [stdout] --> src/main.rs:182:56 [INFO] [stdout] | [INFO] [stdout] 182 | println!("The area of the rectangle is: {}", rect1.area()); [INFO] [stdout] | ^^^^ method not found in `Rectangle` [INFO] [stdout] ... [INFO] [stdout] 425 | struct Rectangle { [INFO] [stdout] | ---------------- method `area` not found for this struct [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `can_hold` found for struct `Rectangle` in the current scope [INFO] [stdout] --> src/main.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | println!("Can rect1 hold rect2? {}", rect1.can_hold(&rect2)); [INFO] [stdout] | ^^^^^^^^ method not found in `Rectangle` [INFO] [stdout] ... [INFO] [stdout] 425 | struct Rectangle { [INFO] [stdout] | ---------------- method `can_hold` not found for this struct [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no function or associated item named `square` found for struct `Rectangle` in the current scope [INFO] [stdout] --> src/main.rs:188:28 [INFO] [stdout] | [INFO] [stdout] 188 | let rect3 = Rectangle::square(3); [INFO] [stdout] | ^^^^^^ function or associated item not found in `Rectangle` [INFO] [stdout] ... [INFO] [stdout] 425 | struct Rectangle { [INFO] [stdout] | ---------------- function or associated item `square` not found for this struct [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `IpAddrKind` [INFO] [stdout] --> src/main.rs:191:16 [INFO] [stdout] | [INFO] [stdout] 191 | let four = IpAddrKind::V4; [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `IpAddrKind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `IpAddrKind` [INFO] [stdout] --> src/main.rs:192:15 [INFO] [stdout] | [INFO] [stdout] 192 | let six = IpAddrKind::V6; [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `IpAddrKind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `IpAddrKind` [INFO] [stdout] --> src/main.rs:194:15 [INFO] [stdout] | [INFO] [stdout] 194 | kind: IpAddrKind::V4, [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `IpAddrKind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `IpAddrKind` [INFO] [stdout] --> src/main.rs:198:15 [INFO] [stdout] | [INFO] [stdout] 198 | kind: IpAddrKind::V6, [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `IpAddrKind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `IpAddrKind` [INFO] [stdout] --> src/main.rs:201:16 [INFO] [stdout] | [INFO] [stdout] 201 | let home = IpAddrKind::V4(String::from("192.323.332.123")); [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `IpAddrKind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `IpAddrKind` [INFO] [stdout] --> src/main.rs:202:20 [INFO] [stdout] | [INFO] [stdout] 202 | let loopback = IpAddrKind::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^^^ use of undeclared type `IpAddrKind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Coin` [INFO] [stdout] --> src/main.rs:224:16 [INFO] [stdout] | [INFO] [stdout] 224 | let coin = Coin::Penny; [INFO] [stdout] | ^^^^ use of undeclared type `Coin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `value_in_cents` in this scope [INFO] [stdout] --> src/main.rs:225:17 [INFO] [stdout] | [INFO] [stdout] 225 | let value = value_in_cents(coin); [INFO] [stdout] | ^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Coin` [INFO] [stdout] --> src/main.rs:227:16 [INFO] [stdout] | [INFO] [stdout] 227 | let coin = Coin::Quarter(UsState::Alabama); [INFO] [stdout] | ^^^^ use of undeclared type `Coin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `UsState` [INFO] [stdout] --> src/main.rs:227:30 [INFO] [stdout] | [INFO] [stdout] 227 | let coin = Coin::Quarter(UsState::Alabama); [INFO] [stdout] | ^^^^^^^ use of undeclared type `UsState` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `value_in_cents` in this scope [INFO] [stdout] --> src/main.rs:228:17 [INFO] [stdout] | [INFO] [stdout] 228 | let value = value_in_cents(coin); [INFO] [stdout] | ^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Coin` [INFO] [stdout] --> src/main.rs:237:16 [INFO] [stdout] | [INFO] [stdout] 237 | let coin = Coin::Quarter(UsState::Alabama); [INFO] [stdout] | ^^^^ use of undeclared type `Coin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `UsState` [INFO] [stdout] --> src/main.rs:237:30 [INFO] [stdout] | [INFO] [stdout] 237 | let coin = Coin::Quarter(UsState::Alabama); [INFO] [stdout] | ^^^^^^^ use of undeclared type `UsState` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0618]: expected function, found `{integer}` [INFO] [stdout] --> src/main.rs:267:19 [INFO] [stdout] | [INFO] [stdout] 264 | let largest = largest(&num_list); [INFO] [stdout] | ------- `largest` has type `{integer}` [INFO] [stdout] ... [INFO] [stdout] 267 | let largest = largest(&char_list); [INFO] [stdout] | ^^^^^^^------------ [INFO] [stdout] | | [INFO] [stdout] | call expression requires function [INFO] [stdout] ... [INFO] [stdout] 382 | fn largest(list: &[T]) -> T { [INFO] [stdout] | ------------------------------------------------- this function of the same name is available here, but it's shadowed by the local binding [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:321:27 [INFO] [stdout] | [INFO] [stdout] 321 | let word = first_word(&s); [INFO] [stdout] | ---------- ^^ expected `&String`, found `&&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&String` [INFO] [stdout] found reference `&&str` [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/main.rs:392:4 [INFO] [stdout] | [INFO] [stdout] 392 | fn first_word(s: &String) -> &str { [INFO] [stdout] | ^^^^^^^^^^ ---------- [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Coin` [INFO] [stdout] --> src/main.rs:238:15 [INFO] [stdout] | [INFO] [stdout] 238 | while let Coin::Quarter(state) = coin { [INFO] [stdout] | ^^^^ use of undeclared type `Coin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0422, E0425, E0428, E0433, E0599, E0618. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `hello_rust` (bin "hello_rust") due to 22 previous errors [INFO] running `Command { std: "docker" "inspect" "d96f47d691dfacf3e151105e86aff22685fb7694cf009385fc01a501acaae398", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d96f47d691dfacf3e151105e86aff22685fb7694cf009385fc01a501acaae398", kill_on_drop: false }` [INFO] [stdout] d96f47d691dfacf3e151105e86aff22685fb7694cf009385fc01a501acaae398