[INFO] cloning repository https://github.com/talalhafizmuhammad/My-Rust-Projects [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/talalhafizmuhammad/My-Rust-Projects" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftalalhafizmuhammad%2FMy-Rust-Projects", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftalalhafizmuhammad%2FMy-Rust-Projects'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a052b36177aa66428ae275b1ba758ecb8275187d [INFO] testing talalhafizmuhammad/My-Rust-Projects against try#b83b707f97d809763b7861afa7638871f3339a33 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftalalhafizmuhammad%2FMy-Rust-Projects" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/talalhafizmuhammad/My-Rust-Projects [INFO] finished tweaking git repo https://github.com/talalhafizmuhammad/My-Rust-Projects [INFO] tweaked toml for git repo https://github.com/talalhafizmuhammad/My-Rust-Projects written to /workspace/builds/worker-5-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/talalhafizmuhammad/My-Rust-Projects 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/talalhafizmuhammad/My-Rust-Projects 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] fcaeb4595df51e0af071ecab9ada7c1545e2d0e40833cf8b9e3bded4f64ab384 [INFO] running `Command { std: "docker" "start" "-a" "fcaeb4595df51e0af071ecab9ada7c1545e2d0e40833cf8b9e3bded4f64ab384", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fcaeb4595df51e0af071ecab9ada7c1545e2d0e40833cf8b9e3bded4f64ab384", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fcaeb4595df51e0af071ecab9ada7c1545e2d0e40833cf8b9e3bded4f64ab384", kill_on_drop: false }` [INFO] [stdout] fcaeb4595df51e0af071ecab9ada7c1545e2d0e40833cf8b9e3bded4f64ab384 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 3fecf1e031da3b208071fba54293a79ea623c93eefcf88620f009c04496d8f54 [INFO] running `Command { std: "docker" "start" "-a" "3fecf1e031da3b208071fba54293a79ea623c93eefcf88620f009c04496d8f54", kill_on_drop: false }` [INFO] [stderr] Compiling My-Rust-Projects v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `TryInto` [INFO] [stdout] --> src/bin/TypeCasting.rs:40:33 [INFO] [stdout] | [INFO] [stdout] 40 | use std::convert::{TryFrom, TryInto}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:4:18 [INFO] [stdout] | [INFO] [stdout] 4 | let y: u64 = x; // Error: expected u64, found i32 [INFO] [stdout] | --- ^ expected `u64`, found `i32` [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] | [INFO] [stdout] help: you can convert an `i32` to a `u64` and panic if the converted value doesn't fit [INFO] [stdout] | [INFO] [stdout] 4 | let y: u64 = x.try_into().unwrap(); // Error: expected u64, found i32 [INFO] [stdout] | ++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add `f32` to `i32` [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:9:15 [INFO] [stdout] | [INFO] [stdout] 9 | let c = a + b; // Error: no implementation for `i32 + f32` [INFO] [stdout] | ^ no implementation for `i32 + f32` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add` is not implemented for `i32` [INFO] [stdout] = help: the following other types implement trait `Add`: [INFO] [stdout] `&i32` implements `Add` [INFO] [stdout] `&i32` implements `Add` [INFO] [stdout] `i32` implements `Add<&i32>` [INFO] [stdout] `i32` implements `Add` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | let n: i32 = s; // Error: expected i32, found &str [INFO] [stdout] | --- ^ expected `i32`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the type `str` cannot be indexed by `{integer}` [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | let c = my_string[0]; // Error: cannot index into a String directly [INFO] [stdout] | ^ string indices are ranges of `usize` [INFO] [stdout] | [INFO] [stdout] = help: the trait `SliceIndex` is not implemented for `{integer}` [INFO] [stdout] = note: you can use `.chars().nth()` or `.bytes().nth()` [INFO] [stdout] for more information, see chapter 8 in The Book: [INFO] [stdout] = help: the following other types implement trait `SliceIndex`: [INFO] [stdout] `usize` implements `SliceIndex` [INFO] [stdout] `usize` implements `SliceIndex<[T]>` [INFO] [stdout] = note: required for `String` to implement `Index<{integer}>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:43:15 [INFO] [stdout] | [INFO] [stdout] 43 | takes_i32("123"); // Error: expected i32, found &str [INFO] [stdout] | --------- ^^^^^ expected `i32`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this function are incorrect [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:40:8 [INFO] [stdout] | [INFO] [stdout] 40 | fn takes_i32(n: i32) { [INFO] [stdout] | ^^^^^^^^^ ------ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 47 | match val { [INFO] [stdout] | --- this expression has type `{integer}` [INFO] [stdout] 48 | "ten" => println!("Ten"), // Error: expected integer pattern, found &str [INFO] [stdout] | ^^^^^ expected integer, found `&str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0054]: cannot cast `{integer}` as `bool` [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:23:18 [INFO] [stdout] | [INFO] [stdout] 23 | let casted = num as bool; // Error: cast to bool not allowed [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: compare with zero instead [INFO] [stdout] | [INFO] [stdout] 23 - let casted = num as bool; // Error: cast to bool not allowed [INFO] [stdout] 23 + let casted = num != 0; // Error: cast to bool not allowed [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/bin/DataTypeMixingErrors.rs:54:9 [INFO] [stdout] | [INFO] [stdout] 53 | fn foo() -> i32 { [INFO] [stdout] | --- expected `i32` because of return type [INFO] [stdout] 54 | "hello" // Error: expected i32, found &str [INFO] [stdout] | ^^^^^^^ expected `i32`, found `&str` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0054, E0277, E0308. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0054`. [INFO] [stdout] [INFO] [stderr] error: could not compile `My-Rust-Projects` (bin "DataTypeMixingErrors") due to 8 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] running `Command { std: "docker" "inspect" "3fecf1e031da3b208071fba54293a79ea623c93eefcf88620f009c04496d8f54", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3fecf1e031da3b208071fba54293a79ea623c93eefcf88620f009c04496d8f54", kill_on_drop: false }` [INFO] [stdout] 3fecf1e031da3b208071fba54293a79ea623c93eefcf88620f009c04496d8f54