[INFO] cloning repository https://github.com/bookinstock/rust_example [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/bookinstock/rust_example" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbookinstock%2Frust_example", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbookinstock%2Frust_example'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c83d144f2d500cd60a59da5019b4bc5ca7d2d36f [INFO] checking bookinstock/rust_example against master#af4a5a13a15fa0c60e06321077ef452f769b42fd for pr-122960-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fbookinstock%2Frust_example" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/bookinstock/rust_example on toolchain af4a5a13a15fa0c60e06321077ef452f769b42fd [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/bookinstock/rust_example [INFO] finished tweaking git repo https://github.com/bookinstock/rust_example [INFO] tweaked toml for git repo https://github.com/bookinstock/rust_example written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/bookinstock/rust_example 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" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] ae6941b9868ad110407a023d6385cac2ca664ba2c64a3708de61e3d26093a7c1 [INFO] running `Command { std: "docker" "start" "-a" "ae6941b9868ad110407a023d6385cac2ca664ba2c64a3708de61e3d26093a7c1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "ae6941b9868ad110407a023d6385cac2ca664ba2c64a3708de61e3d26093a7c1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ae6941b9868ad110407a023d6385cac2ca664ba2c64a3708de61e3d26093a7c1", kill_on_drop: false }` [INFO] [stdout] ae6941b9868ad110407a023d6385cac2ca664ba2c64a3708de61e3d26093a7c1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bade0a1a7905590d25952aa21dcb5b7116490c02834ca4016adc83715fdb01e4 [INFO] running `Command { std: "docker" "start" "-a" "bade0a1a7905590d25952aa21dcb5b7116490c02834ca4016adc83715fdb01e4", kill_on_drop: false }` [INFO] [stderr] Checking rust_example v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: the item `From` is imported redundantly [INFO] [stdout] --> src/bin/conversion.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | use std::convert::From; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] --> /rustc/af4a5a13a15fa0c60e06321077ef452f769b42fd/library/std/src/prelude/mod.rs:134:13 [INFO] [stdout] | [INFO] [stdout] = note: the item `From` is already defined here [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the item `ToString` is imported redundantly [INFO] [stdout] --> src/bin/conversion.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | use std::string::ToString; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] --> /rustc/af4a5a13a15fa0c60e06321077ef452f769b42fd/library/std/src/prelude/mod.rs:134:13 [INFO] [stdout] | [INFO] [stdout] = note: the item `ToString` is already defined here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `futures` [INFO] [stdout] --> src/bin/async.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use futures::executor::block_on; [INFO] [stdout] | ^^^^^^^ use of undeclared crate or module `futures` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0601]: `main` function not found in crate `error` [INFO] [stdout] --> src/bin/error.rs:41:4 [INFO] [stdout] | [INFO] [stdout] 41 | */ [INFO] [stdout] | ^ consider adding a `main` function to `src/bin/error.rs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0601`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0433`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_example` (bin "error") due to 2 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: path statement with no effect [INFO] [stdout] --> src/bin/expression.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | x; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(path_statements)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused arithmetic operation that must be used [INFO] [stdout] --> src/bin/expression.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | x + 1; [INFO] [stdout] | ^^^^^ the arithmetic operation produces a value [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 19 | let _ = x + 1; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0601]: `main` function not found in crate `r#trait` [INFO] [stdout] --> src/bin/trait.rs:15:4 [INFO] [stdout] | [INFO] [stdout] 15 | */ [INFO] [stdout] | ^ consider adding a `main` function to `src/bin/trait.rs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused arithmetic operation that must be used [INFO] [stdout] --> src/bin/expression.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | 2 * x; [INFO] [stdout] | ^^^^^ the arithmetic operation produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 36 | let _ = 2 * x; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0601`. [INFO] [stdout] [INFO] [stdout] error[E0601]: `main` function not found in crate `std` [INFO] [stdout] --> src/bin/std.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | */ [INFO] [stdout] | ^ consider adding a `main` function to `src/bin/std.rs` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0601`. [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_example` (bin "async" test) due to 2 previous errors [INFO] [stderr] error: could not compile `rust_example` (bin "trait") due to 2 previous errors [INFO] [stderr] error: could not compile `rust_example` (bin "std") due to 2 previous errors [INFO] [stdout] warning: unused variable: `my_string` [INFO] [stdout] --> src/bin/conversion.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let my_string = String::from(my_str); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_my_string` [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/bin/conversion.rs:45:8 [INFO] [stdout] | [INFO] [stdout] 45 | #[warn(unused_variables)] [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_literal` is never used [INFO] [stdout] --> src/bin/pattern_matching.rs:113:4 [INFO] [stdout] | [INFO] [stdout] 113 | fn test_literal() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_array` is never used [INFO] [stdout] --> src/bin/pattern_matching.rs:115:4 [INFO] [stdout] | [INFO] [stdout] 115 | fn test_array() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_enum` is never used [INFO] [stdout] --> src/bin/pattern_matching.rs:117:4 [INFO] [stdout] | [INFO] [stdout] 117 | fn test_enum() {} [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_stuct` is never used [INFO] [stdout] --> src/bin/pattern_matching.rs:119:4 [INFO] [stdout] | [INFO] [stdout] 119 | fn test_stuct() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_variable` is never used [INFO] [stdout] --> src/bin/pattern_matching.rs:137:4 [INFO] [stdout] | [INFO] [stdout] 137 | fn test_variable() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_wildcard` is never used [INFO] [stdout] --> src/bin/pattern_matching.rs:139:4 [INFO] [stdout] | [INFO] [stdout] 139 | fn test_wildcard() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_placeholder` is never used [INFO] [stdout] --> src/bin/pattern_matching.rs:141:4 [INFO] [stdout] | [INFO] [stdout] 141 | fn test_placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 7 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/bin/scope.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | let x = ToDrop; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bin/generic.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | let s = S(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ref_x` [INFO] [stdout] --> src/bin/scope.rs:401:13 [INFO] [stdout] | [INFO] [stdout] 401 | let ref_x = &x; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_ref_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/scope.rs:405:13 [INFO] [stdout] | [INFO] [stdout] 405 | let mut ref_x = &mut x; [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ps_ref` is never used [INFO] [stdout] --> src/bin/scope.rs:444:4 [INFO] [stdout] | [INFO] [stdout] 444 | fn ps_ref() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x` and `y` are never read [INFO] [stdout] --> src/bin/generic.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 43 | struct A { [INFO] [stdout] | - fields in this struct [INFO] [stdout] 44 | x: i32, [INFO] [stdout] | ^ [INFO] [stdout] 45 | y: i32, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `A` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `S` is never constructed [INFO] [stdout] --> src/bin/generic.rs:135:12 [INFO] [stdout] | [INFO] [stdout] 135 | struct S; // 具体类型 `S` [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `GenericVal` is never constructed [INFO] [stdout] --> src/bin/generic.rs:136:12 [INFO] [stdout] | [INFO] [stdout] 136 | struct GenericVal(T); // 泛型类型 `GenericVal` [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `printer` is never used [INFO] [stdout] --> src/bin/generic.rs:210:8 [INFO] [stdout] | [INFO] [stdout] 210 | fn printer(t: T) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/bin/custom_type.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 24 | struct Person<'a> { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 25 | name: &'a str, [INFO] [stdout] | ^^^^ [INFO] [stdout] 26 | age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Person` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Nil` is never constructed [INFO] [stdout] --> src/bin/custom_type.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Nil; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Rich` is never constructed [INFO] [stdout] --> src/bin/custom_type.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 116 | enum Status { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 117 | Rich, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Soldier` is never constructed [INFO] [stdout] --> src/bin/custom_type.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 121 | enum Work { [INFO] [stdout] | ---- variant in this enum [INFO] [stdout] 122 | Civilian, [INFO] [stdout] 123 | Soldier, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ttt` is never used [INFO] [stdout] --> src/bin/hello.rs:107:4 [INFO] [stdout] | [INFO] [stdout] 107 | fn ttt() { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `f` is never used [INFO] [stdout] --> src/bin/hello.rs:120:4 [INFO] [stdout] | [INFO] [stdout] 120 | fn f() { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/bin/hello.rs:124:4 [INFO] [stdout] | [INFO] [stdout] 124 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `try_debug_trait` is never used [INFO] [stdout] --> src/bin/hello.rs:159:4 [INFO] [stdout] | [INFO] [stdout] 159 | fn try_debug_trait() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `red`, `green`, and `blue` are never read [INFO] [stdout] --> src/bin/hello.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 242 | struct Color { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 243 | red: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] 244 | green: u8, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 245 | blue: u8, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Color` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "bade0a1a7905590d25952aa21dcb5b7116490c02834ca4016adc83715fdb01e4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bade0a1a7905590d25952aa21dcb5b7116490c02834ca4016adc83715fdb01e4", kill_on_drop: false }` [INFO] [stdout] bade0a1a7905590d25952aa21dcb5b7116490c02834ca4016adc83715fdb01e4