[INFO] cloning repository https://github.com/chomosuke/cppCompiler [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/chomosuke/cppCompiler" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchomosuke%2FcppCompiler", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchomosuke%2FcppCompiler'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 841536c08952147d3020840e4fbc41cc23915e23 [INFO] checking chomosuke/cppCompiler against master#5a8a44196b3cf099f8c9b0156bd902eaec0b4e5f for pr-87248 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fchomosuke%2FcppCompiler" "/workspace/builds/worker-5/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/chomosuke/cppCompiler on toolchain 5a8a44196b3cf099f8c9b0156bd902eaec0b4e5f [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+5a8a44196b3cf099f8c9b0156bd902eaec0b4e5f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/chomosuke/cppCompiler [INFO] finished tweaking git repo https://github.com/chomosuke/cppCompiler [INFO] tweaked toml for git repo https://github.com/chomosuke/cppCompiler written to /workspace/builds/worker-5/source/Cargo.toml [INFO] crate git repo https://github.com/chomosuke/cppCompiler already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+5a8a44196b3cf099f8c9b0156bd902eaec0b4e5f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/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" "+5a8a44196b3cf099f8c9b0156bd902eaec0b4e5f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a790ae5660900bc2a5dc2448503daef41013aa388113b88ace9b25b39fd14471 [INFO] running `Command { std: "docker" "start" "-a" "a790ae5660900bc2a5dc2448503daef41013aa388113b88ace9b25b39fd14471", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a790ae5660900bc2a5dc2448503daef41013aa388113b88ace9b25b39fd14471", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a790ae5660900bc2a5dc2448503daef41013aa388113b88ace9b25b39fd14471", kill_on_drop: false }` [INFO] [stdout] a790ae5660900bc2a5dc2448503daef41013aa388113b88ace9b25b39fd14471 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5/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" "+5a8a44196b3cf099f8c9b0156bd902eaec0b4e5f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0e8ca1a9d72346f6cffa831c43e611fb79519e99e7121b9166978dc23f82f99b [INFO] running `Command { std: "docker" "start" "-a" "0e8ca1a9d72346f6cffa831c43e611fb79519e99e7121b9166978dc23f82f99b", kill_on_drop: false }` [INFO] [stderr] Compiling memchr v2.4.0 [INFO] [stderr] Checking aho-corasick v0.7.18 [INFO] [stderr] Checking regex v1.5.4 [INFO] [stderr] Checking cpp_compiler v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0425]: cannot find value `preprocess` in this scope [INFO] [stdout] --> src/compile.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | preprocess [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 3 | use crate::preprocessor::preprocess; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0423]: expected function, found module `compile` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | compile(args); [INFO] [stdout] | ^^^^^^^ not a function [INFO] [stdout] | [INFO] [stdout] help: consider importing this function instead [INFO] [stdout] | [INFO] [stdout] 4 | use crate::compile::compile; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `preprocess` in this scope [INFO] [stdout] --> src/compile.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | preprocess [INFO] [stdout] | ^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 3 | use crate::preprocessor::preprocess; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0423]: expected function, found module `compile` [INFO] [stdout] --> src/main.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | compile(args); [INFO] [stdout] | ^^^^^^^ not a function [INFO] [stdout] | [INFO] [stdout] help: consider importing this function instead [INFO] [stdout] | [INFO] [stdout] 4 | use crate::compile::compile; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | fn preprocess(path: &str) -> Vec { [INFO] [stdout] | ----------- expected `Vec` because of return type [INFO] [stdout] 5 | preprocess_file(path) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Result` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec<_>` [INFO] [stdout] found enum `Result, &str>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: cannot add `&str` to `&str` [INFO] [stdout] --> src/preprocessor.rs:11:68 [INFO] [stdout] | [INFO] [stdout] 11 | let source = fs::read_to_string(path).expect("unable to read " + path); [INFO] [stdout] | ----------------- ^ ---- &str [INFO] [stdout] | | | [INFO] [stdout] | | `+` cannot be used to concatenate two `&str` strings [INFO] [stdout] | &str [INFO] [stdout] | [INFO] [stdout] help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left [INFO] [stdout] | [INFO] [stdout] 11 | let source = fs::read_to_string(path).expect("unable to read ".to_owned() + path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: can't compare `&char` with `char` [INFO] [stdout] --> src/preprocessor.rs:14:60 [INFO] [stdout] | [INFO] [stdout] 14 | let mut chars: Vec = source.chars().filter(|c| c != '\r').collect(); [INFO] [stdout] | ^^ no implementation for `&char == char` [INFO] [stdout] | [INFO] [stdout] = help: the trait `PartialEq` is not implemented for `&char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 4 | fn preprocess(path: &str) -> Vec { [INFO] [stdout] | ----------- expected `Vec` because of return type [INFO] [stdout] 5 | preprocess_file(path) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Result` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec<_>` [INFO] [stdout] found enum `Result, &str>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: cannot add `&[char]` to `&str` [INFO] [stdout] --> src/preprocessor.rs:37:73 [INFO] [stdout] | [INFO] [stdout] 37 | return Err("invalid universal character name: " + [INFO] [stdout] | ------------------------------------ ^ [INFO] [stdout] | | [INFO] [stdout] | &str [INFO] [stdout] 38 | &chars[j..j + 2 + hex_len]); [INFO] [stdout] | -------------------------- &[char] [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:94:23 [INFO] [stdout] | [INFO] [stdout] 94 | result += byte - '0' as u8 + 0x0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: cannot add `&str` to `&str` [INFO] [stdout] --> src/preprocessor.rs:11:68 [INFO] [stdout] | [INFO] [stdout] 11 | let source = fs::read_to_string(path).expect("unable to read " + path); [INFO] [stdout] | ----------------- ^ ---- &str [INFO] [stdout] | | | [INFO] [stdout] | | `+` cannot be used to concatenate two `&str` strings [INFO] [stdout] | &str [INFO] [stdout] | [INFO] [stdout] help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left [INFO] [stdout] | [INFO] [stdout] 11 | let source = fs::read_to_string(path).expect("unable to read ".to_owned() + path); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: can't compare `&char` with `char` [INFO] [stdout] --> src/preprocessor.rs:14:60 [INFO] [stdout] | [INFO] [stdout] 14 | let mut chars: Vec = source.chars().filter(|c| c != '\r').collect(); [INFO] [stdout] | ^^ no implementation for `&char == char` [INFO] [stdout] | [INFO] [stdout] = help: the trait `PartialEq` is not implemented for `&char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add-assign `u8` to `u32` [INFO] [stdout] --> src/preprocessor.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | result += byte - '0' as u8 + 0x0; [INFO] [stdout] | ^^ no implementation for `u32 += u8` [INFO] [stdout] | [INFO] [stdout] = help: the trait `AddAssign` is not implemented for `u32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:96:23 [INFO] [stdout] | [INFO] [stdout] 96 | result += byte - 'a' as u8 + 0xA; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add-assign `u8` to `u32` [INFO] [stdout] --> src/preprocessor.rs:96:20 [INFO] [stdout] | [INFO] [stdout] 96 | result += byte - 'a' as u8 + 0xA; [INFO] [stdout] | ^^ no implementation for `u32 += u8` [INFO] [stdout] | [INFO] [stdout] = help: the trait `AddAssign` is not implemented for `u32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:98:23 [INFO] [stdout] | [INFO] [stdout] 98 | result += byte - 'A' as u8 + 0xA; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add-assign `u8` to `u32` [INFO] [stdout] --> src/preprocessor.rs:98:20 [INFO] [stdout] | [INFO] [stdout] 98 | result += byte - 'A' as u8 + 0xA; [INFO] [stdout] | ^^ no implementation for `u32 += u8` [INFO] [stdout] | [INFO] [stdout] = help: the trait `AddAssign` is not implemented for `u32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0606]: casting `&char` as `u8` is invalid [INFO] [stdout] --> src/preprocessor.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | let byte = char as u8; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: cast through a raw pointer first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0604]: only `u8` can be cast as `char`, not `u32` [INFO] [stdout] --> src/preprocessor.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | return Some(result as char); [INFO] [stdout] | ^^^^^^^^^^^^^^ invalid cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: cannot add `&[char]` to `&str` [INFO] [stdout] --> src/preprocessor.rs:37:73 [INFO] [stdout] | [INFO] [stdout] 37 | return Err("invalid universal character name: " + [INFO] [stdout] | ------------------------------------ ^ [INFO] [stdout] | | [INFO] [stdout] | &str [INFO] [stdout] 38 | &chars[j..j + 2 + hex_len]); [INFO] [stdout] | -------------------------- &[char] [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 14 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0369, E0423, E0425, E0604, E0606. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:94:23 [INFO] [stdout] | [INFO] [stdout] 94 | result += byte - '0' as u8 + 0x0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add-assign `u8` to `u32` [INFO] [stdout] --> src/preprocessor.rs:94:20 [INFO] [stdout] | [INFO] [stdout] 94 | result += byte - '0' as u8 + 0x0; [INFO] [stdout] | ^^ no implementation for `u32 += u8` [INFO] [stdout] | [INFO] [stdout] = help: the trait `AddAssign` is not implemented for `u32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:96:23 [INFO] [stdout] | [INFO] [stdout] 96 | result += byte - 'a' as u8 + 0xA; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u8` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add-assign `u8` to `u32` [INFO] [stdout] --> src/preprocessor.rs:96:20 [INFO] [stdout] | [INFO] [stdout] 96 | result += byte - 'a' as u8 + 0xA; [INFO] [stdout] | ^^ no implementation for `u32 += u8` [INFO] [stdout] | [INFO] [stdout] = help: the trait `AddAssign` is not implemented for `u32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/preprocessor.rs:98:23 [INFO] [stdout] | [INFO] [stdout] 98 | result += byte - 'A' as u8 + 0xA; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u8` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `cpp_compiler` due to 15 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0277]: cannot add-assign `u8` to `u32` [INFO] [stdout] --> src/preprocessor.rs:98:20 [INFO] [stdout] | [INFO] [stdout] 98 | result += byte - 'A' as u8 + 0xA; [INFO] [stdout] | ^^ no implementation for `u32 += u8` [INFO] [stdout] | [INFO] [stdout] = help: the trait `AddAssign` is not implemented for `u32` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0606]: casting `&char` as `u8` is invalid [INFO] [stdout] --> src/preprocessor.rs:92:20 [INFO] [stdout] | [INFO] [stdout] 92 | let byte = char as u8; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: cast through a raw pointer first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0604]: only `u8` can be cast as `char`, not `u32` [INFO] [stdout] --> src/preprocessor.rs:103:17 [INFO] [stdout] | [INFO] [stdout] 103 | return Some(result as char); [INFO] [stdout] | ^^^^^^^^^^^^^^ invalid cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 14 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0369, E0423, E0425, E0604, E0606. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "0e8ca1a9d72346f6cffa831c43e611fb79519e99e7121b9166978dc23f82f99b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0e8ca1a9d72346f6cffa831c43e611fb79519e99e7121b9166978dc23f82f99b", kill_on_drop: false }` [INFO] [stdout] 0e8ca1a9d72346f6cffa831c43e611fb79519e99e7121b9166978dc23f82f99b