[INFO] cloning repository https://github.com/wanken/rust-starter [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/wanken/rust-starter" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwanken%2Frust-starter", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwanken%2Frust-starter'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e41d3b448315e63560bbf0de8a6176b58e9e0ffd [INFO] checking wanken/rust-starter against try#4f260f0f20b3133d20cfb50353c0221943af5796+rustflags=-Dunmustuse_in_always_ok for pr-148577 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwanken%2Frust-starter" "/workspace/builds/worker-7-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/wanken/rust-starter [INFO] finished tweaking git repo https://github.com/wanken/rust-starter [INFO] tweaked toml for git repo https://github.com/wanken/rust-starter written to /workspace/builds/worker-7-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/wanken/rust-starter on toolchain 4f260f0f20b3133d20cfb50353c0221943af5796 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/wanken/rust-starter 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" "+4f260f0f20b3133d20cfb50353c0221943af5796" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 234eac4d0943f510614381fe2b7956ed83d56428957e45672172f1f1f51eb8e1 [INFO] running `Command { std: "docker" "start" "-a" "234eac4d0943f510614381fe2b7956ed83d56428957e45672172f1f1f51eb8e1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "234eac4d0943f510614381fe2b7956ed83d56428957e45672172f1f1f51eb8e1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "234eac4d0943f510614381fe2b7956ed83d56428957e45672172f1f1f51eb8e1", kill_on_drop: false }` [INFO] [stdout] 234eac4d0943f510614381fe2b7956ed83d56428957e45672172f1f1f51eb8e1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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 -Dunmustuse_in_always_ok" "-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+4f260f0f20b3133d20cfb50353c0221943af5796" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 1e745d225b186657d573b8a27a6019ccaea4e1d535fd9d42c79faa9f559c8e49 [INFO] running `Command { std: "docker" "start" "-a" "1e745d225b186657d573b8a27a6019ccaea4e1d535fd9d42c79faa9f559c8e49", kill_on_drop: false }` [INFO] [stderr] Checking rust-starter v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused label [INFO] [stdout] --> src/flow_control.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | 'inner2: loop { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused label [INFO] [stdout] --> src/flow_control.rs:177:9 [INFO] [stdout] | [INFO] [stdout] 177 | 'inner2: loop { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/flow_control.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | for name in &names { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/flow_control.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | for n in numbers { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/flow_control.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let mut n = 1; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/flow_control.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | for i in 0..=100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/flow_control.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | for i in 0..=100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/generic.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `float` [INFO] [stdout] --> src/generic.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let float = Point { x: 1.0, y: 4.0 }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/generic.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | let p = Point1 { x: 5, y: "hello".to_string() }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/traits.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/traits.rs:55:31 [INFO] [stdout] | [INFO] [stdout] 55 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/main.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q1` is never used [INFO] [stdout] --> src/flow_control.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn q1() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q2` is never used [INFO] [stdout] --> src/flow_control.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn q2() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q3` is never used [INFO] [stdout] --> src/flow_control.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn q3() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q4` is never used [INFO] [stdout] --> src/flow_control.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn q4() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q5` is never used [INFO] [stdout] --> src/flow_control.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn q5() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q6` is never used [INFO] [stdout] --> src/flow_control.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn q6() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q7` is never used [INFO] [stdout] --> src/flow_control.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn q7() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q8` is never used [INFO] [stdout] --> src/flow_control.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn q8() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q9` is never used [INFO] [stdout] --> src/flow_control.rs:120:8 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn q9() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q10` is never used [INFO] [stdout] --> src/flow_control.rs:146:8 [INFO] [stdout] | [INFO] [stdout] 146 | pub fn q10() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q11` is never used [INFO] [stdout] --> src/flow_control.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | pub fn q11() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/generic.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | pub fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `A` is never constructed [INFO] [stdout] --> src/generic.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct A; [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `S` is never constructed [INFO] [stdout] --> src/generic.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct S(A); [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SGen` is never constructed [INFO] [stdout] --> src/generic.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | struct SGen(T); // 泛型 `SGen`. [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reg_fn` is never used [INFO] [stdout] --> src/generic.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn reg_fn(_s: S) {} [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gen_spec_t` is never used [INFO] [stdout] --> src/generic.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn gen_spec_t(_s: SGen) {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gen_spec_i32` is never used [INFO] [stdout] --> src/generic.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn gen_spec_i32(_s: SGen) {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generic` is never used [INFO] [stdout] --> src/generic.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn generic(_s: SGen) {} [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/generic.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sum` is never used [INFO] [stdout] --> src/generic.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn sum>(a: T, b: T) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_sum` is never used [INFO] [stdout] --> src/generic.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn test_sum() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/generic.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_impl_generic` is never used [INFO] [stdout] --> src/generic.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn test_impl_generic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point1` is never constructed [INFO] [stdout] --> src/generic.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 69 | struct Point1 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_different_generic` is never used [INFO] [stdout] --> src/generic.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn test_different_generic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Val` is never constructed [INFO] [stdout] --> src/generic.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | struct Val { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `value` is never used [INFO] [stdout] --> src/generic.rs:86:8 [INFO] [stdout] | [INFO] [stdout] 85 | impl Val { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 86 | fn value(&self) -> &T { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q3` is never used [INFO] [stdout] --> src/generic.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn q3() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point2` is never constructed [INFO] [stdout] --> src/generic.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | struct Point2 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mix_up` is never used [INFO] [stdout] --> src/generic.rs:106:8 [INFO] [stdout] | [INFO] [stdout] 104 | impl Point2 { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] 105 | // 实现 mixup,不要修改其它代码! [INFO] [stdout] 106 | fn mix_up(self, p: Point2) -> Point2 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q6` is never used [INFO] [stdout] --> src/generic.rs:114:8 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn q6() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/method.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `origin` and `new` are never used [INFO] [stdout] --> src/method.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl Point { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] 8 | // 关联函数的使用方法跟构造器非常类似 [INFO] [stdout] 9 | fn origin() -> Point { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | fn new(x: f64, y: f64) -> Point { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> src/method.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `area` is never used [INFO] [stdout] --> src/method.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 23 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | fn area(&self) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q1` is never used [INFO] [stdout] --> src/pattern_match_match.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn q1() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `content` is never read [INFO] [stdout] --> src/traits.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Post { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/traits.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/traits.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 49 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 50 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `some_function` is never used [INFO] [stdout] --> src/traits.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_summariazble` is never used [INFO] [stdout] --> src/traits.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn return_summariazble() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/traits.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | let b_ = b.try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-starter` (bin "rust-starter") due to 1 previous error; 54 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/flow_control.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | for name in &names { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/flow_control.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | for n in numbers { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/flow_control.rs:70:9 [INFO] [stdout] | [INFO] [stdout] 70 | let mut n = 1; [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/flow_control.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | for i in 0..=100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/flow_control.rs:107:9 [INFO] [stdout] | [INFO] [stdout] 107 | for i in 0..=100 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/generic.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let integer = Point { x: 5, y: 10 }; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `float` [INFO] [stdout] --> src/generic.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let float = Point { x: 1.0, y: 4.0 }; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_float` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `p` [INFO] [stdout] --> src/generic.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | let p = Point1 { x: 5, y: "hello".to_string() }; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_p` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/traits.rs:55:24 [INFO] [stdout] | [INFO] [stdout] 55 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/traits.rs:55:31 [INFO] [stdout] | [INFO] [stdout] 55 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/main.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q1` is never used [INFO] [stdout] --> src/flow_control.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn q1() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q2` is never used [INFO] [stdout] --> src/flow_control.rs:14:8 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn q2() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q3` is never used [INFO] [stdout] --> src/flow_control.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn q3() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q4` is never used [INFO] [stdout] --> src/flow_control.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn q4() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q5` is never used [INFO] [stdout] --> src/flow_control.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | pub fn q5() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q6` is never used [INFO] [stdout] --> src/flow_control.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 66 | pub fn q6() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q7` is never used [INFO] [stdout] --> src/flow_control.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn q7() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q8` is never used [INFO] [stdout] --> src/flow_control.rs:105:8 [INFO] [stdout] | [INFO] [stdout] 105 | pub fn q8() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q9` is never used [INFO] [stdout] --> src/flow_control.rs:120:8 [INFO] [stdout] | [INFO] [stdout] 120 | pub fn q9() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q10` is never used [INFO] [stdout] --> src/flow_control.rs:146:8 [INFO] [stdout] | [INFO] [stdout] 146 | pub fn q10() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q11` is never used [INFO] [stdout] --> src/flow_control.rs:164:8 [INFO] [stdout] | [INFO] [stdout] 164 | pub fn q11() { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test` is never used [INFO] [stdout] --> src/generic.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | pub fn test() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `A` is never constructed [INFO] [stdout] --> src/generic.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct A; [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `S` is never constructed [INFO] [stdout] --> src/generic.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct S(A); [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `SGen` is never constructed [INFO] [stdout] --> src/generic.rs:21:8 [INFO] [stdout] | [INFO] [stdout] 21 | struct SGen(T); // 泛型 `SGen`. [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reg_fn` is never used [INFO] [stdout] --> src/generic.rs:23:4 [INFO] [stdout] | [INFO] [stdout] 23 | fn reg_fn(_s: S) {} [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gen_spec_t` is never used [INFO] [stdout] --> src/generic.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn gen_spec_t(_s: SGen) {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `gen_spec_i32` is never used [INFO] [stdout] --> src/generic.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn gen_spec_i32(_s: SGen) {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generic` is never used [INFO] [stdout] --> src/generic.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn generic(_s: SGen) {} [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `main` is never used [INFO] [stdout] --> src/generic.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | fn main() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sum` is never used [INFO] [stdout] --> src/generic.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn sum>(a: T, b: T) -> T { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_sum` is never used [INFO] [stdout] --> src/generic.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn test_sum() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/generic.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 57 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_impl_generic` is never used [INFO] [stdout] --> src/generic.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 62 | pub fn test_impl_generic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point1` is never constructed [INFO] [stdout] --> src/generic.rs:69:8 [INFO] [stdout] | [INFO] [stdout] 69 | struct Point1 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_different_generic` is never used [INFO] [stdout] --> src/generic.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 74 | pub fn test_different_generic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Val` is never constructed [INFO] [stdout] --> src/generic.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | struct Val { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `value` is never used [INFO] [stdout] --> src/generic.rs:86:8 [INFO] [stdout] | [INFO] [stdout] 85 | impl Val { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 86 | fn value(&self) -> &T { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q3` is never used [INFO] [stdout] --> src/generic.rs:92:8 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn q3() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point2` is never constructed [INFO] [stdout] --> src/generic.rs:99:8 [INFO] [stdout] | [INFO] [stdout] 99 | struct Point2 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `mix_up` is never used [INFO] [stdout] --> src/generic.rs:106:8 [INFO] [stdout] | [INFO] [stdout] 104 | impl Point2 { [INFO] [stdout] | ----------------------- method in this implementation [INFO] [stdout] 105 | // 实现 mixup,不要修改其它代码! [INFO] [stdout] 106 | fn mix_up(self, p: Point2) -> Point2 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q6` is never used [INFO] [stdout] --> src/generic.rs:114:8 [INFO] [stdout] | [INFO] [stdout] 114 | pub fn q6() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/method.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | struct Point { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated functions `origin` and `new` are never used [INFO] [stdout] --> src/method.rs:9:8 [INFO] [stdout] | [INFO] [stdout] 7 | impl Point { [INFO] [stdout] | ---------- associated functions in this implementation [INFO] [stdout] 8 | // 关联函数的使用方法跟构造器非常类似 [INFO] [stdout] 9 | fn origin() -> Point { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 13 | fn new(x: f64, y: f64) -> Point { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> src/method.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `area` is never used [INFO] [stdout] --> src/method.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 23 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 27 | fn area(&self) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `q1` is never used [INFO] [stdout] --> src/pattern_match_match.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn q1() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `content` is never read [INFO] [stdout] --> src/traits.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Post { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] ... [INFO] [stdout] 10 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/traits.rs:44:8 [INFO] [stdout] | [INFO] [stdout] 44 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/traits.rs:50:8 [INFO] [stdout] | [INFO] [stdout] 49 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 50 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `some_function` is never used [INFO] [stdout] --> src/traits.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `return_summariazble` is never used [INFO] [stdout] --> src/traits.rs:63:4 [INFO] [stdout] | [INFO] [stdout] 63 | fn return_summariazble() -> impl Summary { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: this type will no longer be must used: Result [INFO] [stdout] --> src/traits.rs:74:14 [INFO] [stdout] | [INFO] [stdout] 74 | let b_ = b.try_into().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: requested on the command line with `-D unmustuse-in-always-ok` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-starter` (bin "rust-starter" test) due to 1 previous error; 54 warnings emitted [INFO] running `Command { std: "docker" "inspect" "1e745d225b186657d573b8a27a6019ccaea4e1d535fd9d42c79faa9f559c8e49", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1e745d225b186657d573b8a27a6019ccaea4e1d535fd9d42c79faa9f559c8e49", kill_on_drop: false }` [INFO] [stdout] 1e745d225b186657d573b8a27a6019ccaea4e1d535fd9d42c79faa9f559c8e49