[INFO] cloning repository https://github.com/krishna9358/learning-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/krishna9358/learning-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkrishna9358%2Flearning-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkrishna9358%2Flearning-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 3bb2bf39cbb3e9a7cda1f0514ebcba25549233fc [INFO] testing krishna9358/learning-rust against master#733b47ea4b1b86216f14ef56e49440c33933f230+rustflags=-Copt-level=3 for pr-138759-retry [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fkrishna9358%2Flearning-rust" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/krishna9358/learning-rust [INFO] finished tweaking git repo https://github.com/krishna9358/learning-rust [INFO] tweaked toml for git repo https://github.com/krishna9358/learning-rust written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/krishna9358/learning-rust on toolchain 733b47ea4b1b86216f14ef56e49440c33933f230 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+733b47ea4b1b86216f14ef56e49440c33933f230" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/krishna9358/learning-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" "+733b47ea4b1b86216f14ef56e49440c33933f230" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+733b47ea4b1b86216f14ef56e49440c33933f230" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b24e86e472a0eec8d0e7a83cec20654e4e6c855cb962a53fdd1fa3c006ca3fce [INFO] running `Command { std: "docker" "start" "-a" "b24e86e472a0eec8d0e7a83cec20654e4e6c855cb962a53fdd1fa3c006ca3fce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b24e86e472a0eec8d0e7a83cec20654e4e6c855cb962a53fdd1fa3c006ca3fce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b24e86e472a0eec8d0e7a83cec20654e4e6c855cb962a53fdd1fa3c006ca3fce", kill_on_drop: false }` [INFO] [stdout] b24e86e472a0eec8d0e7a83cec20654e4e6c855cb962a53fdd1fa3c006ca3fce [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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 -Copt-level=3" "-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:e90291280db7d1fac5b66fc6dad9f9662629e7365a55743daf9bdf73ebc4ea79" "/opt/rustwide/cargo-home/bin/cargo" "+733b47ea4b1b86216f14ef56e49440c33933f230" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] a85af42c4a1aeed4ce845582039ac4079fb66de26149ae36ea0aec6fe2291f20 [INFO] running `Command { std: "docker" "start" "-a" "a85af42c4a1aeed4ce845582039ac4079fb66de26149ae36ea0aec6fe2291f20", kill_on_drop: false }` [INFO] [stderr] Compiling rust-programming v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: the `#[proc_macro]` attribute is only usable with crates of the `proc-macro` crate type [INFO] [stdout] --> src/main.rs:211:1 [INFO] [stdout] | [INFO] [stdout] 211 | #[proc_macro] [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find derive macro `copy` in this scope [INFO] [stdout] --> src/main.rs:204:10 [INFO] [stdout] | [INFO] [stdout] 204 | #[derive(copy, clone)] [INFO] [stdout] | ^^^^ help: a derive macro with a similar name exists (notice the capitalization): `Copy` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/marker.rs:469:1 [INFO] [stdout] | [INFO] [stdout] = note: similarly named derive macro `Copy` defined here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find derive macro `clone` in this scope [INFO] [stdout] --> src/main.rs:204:16 [INFO] [stdout] | [INFO] [stdout] 204 | #[derive(copy, clone)] [INFO] [stdout] | ^^^^^ help: a derive macro with a similar name exists (notice the capitalization): `Clone` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/clone.rs:225:1 [INFO] [stdout] | [INFO] [stdout] = note: similarly named derive macro `Clone` defined here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `TokenStream` in this scope [INFO] [stdout] --> src/main.rs:212:20 [INFO] [stdout] | [INFO] [stdout] 212 | fn my_macro(input: TokenStream) -> TokenStream{ [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `TokenStream` in this scope [INFO] [stdout] --> src/main.rs:212:36 [INFO] [stdout] | [INFO] [stdout] 212 | fn my_macro(input: TokenStream) -> TokenStream{ [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `say_hello` [INFO] [stdout] --> src/main.rs:194:14 [INFO] [stdout] | [INFO] [stdout] 194 | macro_rules! say_hello { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `my_macro` [INFO] [stdout] --> src/main.rs:212:4 [INFO] [stdout] | [INFO] [stdout] 212 | fn my_macro(input: TokenStream) -> TokenStream{ [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:108:47 [INFO] [stdout] | [INFO] [stdout] 108 | let content : Result = read_to_string( "file.txt"); [INFO] [stdout] | --------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result`, found `Result` [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] | [INFO] [stdout] = note: `Result` and `Result` have similar names, but are actually distinct types [INFO] [stdout] note: `Result` is defined in crate `core` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/result.rs:548:1 [INFO] [stdout] note: `Result` is defined in the current crate [INFO] [stdout] --> src/main.rs:161:1 [INFO] [stdout] | [INFO] [stdout] 161 | enum Result{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 109 | match content{ [INFO] [stdout] | ------- this expression has type `Result` [INFO] [stdout] 110 | Ok(content) => println!("{}", content), [INFO] [stdout] | ^^^^^^^^^^^ expected `Result`, found `Result<_, _>` [INFO] [stdout] | [INFO] [stdout] = note: `std::result::Result<_, _>` and `Result` have similar names, but are actually distinct types [INFO] [stdout] note: `std::result::Result<_, _>` is defined in crate `core` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/result.rs:548:1 [INFO] [stdout] note: `Result` is defined in the current crate [INFO] [stdout] --> src/main.rs:161:1 [INFO] [stdout] | [INFO] [stdout] 161 | enum Result{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 109 | match content{ [INFO] [stdout] | ------- this expression has type `Result` [INFO] [stdout] 110 | Ok(content) => println!("{}", content), [INFO] [stdout] 111 | Err(error) => println!("Error: {}", error) [INFO] [stdout] | ^^^^^^^^^^ expected `Result`, found `Result<_, _>` [INFO] [stdout] | [INFO] [stdout] = note: `std::result::Result<_, _>` and `Result` have similar names, but are actually distinct types [INFO] [stdout] note: `std::result::Result<_, _>` is defined in crate `core` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/result.rs:548:1 [INFO] [stdout] note: `Result` is defined in the current crate [INFO] [stdout] --> src/main.rs:161:1 [INFO] [stdout] | [INFO] [stdout] 161 | enum Result{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:154:23 [INFO] [stdout] | [INFO] [stdout] 154 | let x : Option = Some(5); [INFO] [stdout] | ----------- ^^^^^^^ expected `Option`, found `Option<{integer}>` [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] | [INFO] [stdout] = note: `std::option::Option<{integer}>` and `Option` have similar names, but are actually distinct types [INFO] [stdout] note: `std::option::Option<{integer}>` is defined in crate `core` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/option.rs:591:1 [INFO] [stdout] note: `Option` is defined in the current crate [INFO] [stdout] --> src/main.rs:147:1 [INFO] [stdout] | [INFO] [stdout] 147 | enum Option{ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:155:23 [INFO] [stdout] | [INFO] [stdout] 155 | let y : Option = None; [INFO] [stdout] | ----------- ^^^^ expected `Option`, found `Option<_>` [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] | [INFO] [stdout] = note: `std::option::Option<_>` and `Option` have similar names, but are actually distinct types [INFO] [stdout] note: `std::option::Option<_>` is defined in crate `core` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/option.rs:591:1 [INFO] [stdout] note: `Option` is defined in the current crate [INFO] [stdout] --> src/main.rs:147:1 [INFO] [stdout] | [INFO] [stdout] 147 | enum Option{ [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `Option` doesn't implement `Debug` [INFO] [stdout] --> src/main.rs:156:18 [INFO] [stdout] | [INFO] [stdout] 156 | println!("{:?}", x); [INFO] [stdout] | ---- ^ `Option` cannot be formatted using `{:?}` because it doesn't implement `Debug` [INFO] [stdout] | | [INFO] [stdout] | required by this formatting parameter [INFO] [stdout] | [INFO] [stdout] = help: the trait `Debug` is not implemented for `Option` [INFO] [stdout] = note: add `#[derive(Debug)]` to `Option` or manually `impl Debug for Option` [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] help: consider annotating `Option` with `#[derive(Debug)]` [INFO] [stdout] | [INFO] [stdout] 147 + #[derive(Debug)] [INFO] [stdout] 148 | enum Option{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: `Option` doesn't implement `Debug` [INFO] [stdout] --> src/main.rs:157:18 [INFO] [stdout] | [INFO] [stdout] 157 | println!("{:?}", y); [INFO] [stdout] | ---- ^ `Option` cannot be formatted using `{:?}` because it doesn't implement `Debug` [INFO] [stdout] | | [INFO] [stdout] | required by this formatting parameter [INFO] [stdout] | [INFO] [stdout] = help: the trait `Debug` is not implemented for `Option` [INFO] [stdout] = note: add `#[derive(Debug)]` to `Option` or manually `impl Debug for Option` [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] help: consider annotating `Option` with `#[derive(Debug)]` [INFO] [stdout] | [INFO] [stdout] 147 + #[derive(Debug)] [INFO] [stdout] 148 | enum Option{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:169:16 [INFO] [stdout] | [INFO] [stdout] 167 | fn divide(a : i32, b : i32) -> Result{ [INFO] [stdout] | ------------------- expected `Result` because of return type [INFO] [stdout] 168 | if b == 0{ [INFO] [stdout] 169 | return Err(String::from("Cannot divide by zero")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result`, found `Result<_, String>` [INFO] [stdout] | [INFO] [stdout] = note: `std::result::Result<_, String>` and `Result` have similar names, but are actually distinct types [INFO] [stdout] note: `std::result::Result<_, String>` is defined in crate `core` [INFO] [stdout] --> /rustc/733b47ea4b1b86216f14ef56e49440c33933f230/library/core/src/result.rs:548:1 [INFO] [stdout] note: `Result` is defined in the current crate [INFO] [stdout] --> src/main.rs:161:1 [INFO] [stdout] | [INFO] [stdout] 161 | enum Result{ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `TokenStream` [INFO] [stdout] --> src/main.rs:213:12 [INFO] [stdout] | [INFO] [stdout] 213 | return TokenStream::new(); [INFO] [stdout] | ^^^^^^^^^^^ use of undeclared type `TokenStream` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0277, E0308, E0412, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-programming` (bin "rust-programming") due to 14 previous errors; 2 warnings emitted [INFO] running `Command { std: "docker" "inspect" "a85af42c4a1aeed4ce845582039ac4079fb66de26149ae36ea0aec6fe2291f20", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a85af42c4a1aeed4ce845582039ac4079fb66de26149ae36ea0aec6fe2291f20", kill_on_drop: false }` [INFO] [stdout] a85af42c4a1aeed4ce845582039ac4079fb66de26149ae36ea0aec6fe2291f20