[INFO] cloning repository https://github.com/yuan-yuan-jia/rustbasic [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/yuan-yuan-jia/rustbasic" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyuan-yuan-jia%2Frustbasic", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyuan-yuan-jia%2Frustbasic'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f35faa522e6d799efa66db7ab523183c6461db8b [INFO] checking yuan-yuan-jia/rustbasic against master#2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a for pr-145113 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fyuan-yuan-jia%2Frustbasic" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/yuan-yuan-jia/rustbasic [INFO] finished tweaking git repo https://github.com/yuan-yuan-jia/rustbasic [INFO] tweaked toml for git repo https://github.com/yuan-yuan-jia/rustbasic written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/yuan-yuan-jia/rustbasic on toolchain 2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/yuan-yuan-jia/rustbasic 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" "+2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a" "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:ae6f63d130afcfff7f91f5ba9fdb2a74d52830289c6a2ea2d23a94dcfb480a0d" "/opt/rustwide/cargo-home/bin/cargo" "+2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 095dd6dfbfe24ffd44085250fc8ce62261ef8156413e29162a7b831a6bd0285d [INFO] running `Command { std: "docker" "start" "-a" "095dd6dfbfe24ffd44085250fc8ce62261ef8156413e29162a7b831a6bd0285d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "095dd6dfbfe24ffd44085250fc8ce62261ef8156413e29162a7b831a6bd0285d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "095dd6dfbfe24ffd44085250fc8ce62261ef8156413e29162a7b831a6bd0285d", kill_on_drop: false }` [INFO] [stdout] 095dd6dfbfe24ffd44085250fc8ce62261ef8156413e29162a7b831a6bd0285d [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:ae6f63d130afcfff7f91f5ba9fdb2a74d52830289c6a2ea2d23a94dcfb480a0d" "/opt/rustwide/cargo-home/bin/cargo" "+2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f5d63d50e208672b2886d5501c49f63c464e64be361685c9a0506a79e374806b [INFO] running `Command { std: "docker" "start" "-a" "f5d63d50e208672b2886d5501c49f63c464e64be361685c9a0506a79e374806b", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.95 [INFO] [stderr] Compiling unicode-ident v1.0.18 [INFO] [stderr] Compiling thiserror v2.0.12 [INFO] [stderr] Compiling anyhow v1.0.98 [INFO] [stderr] Compiling quote v1.0.40 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [INFO] [stderr] Checking demo_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: method `call` is never used [INFO] [stdout] --> bin/chapter18/chapter18_5.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 2 | trait Phone{ [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 3 | fn call(&self); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let a = Box::new(5); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bb` [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let bb = a.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_bb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let cc = Rc::clone(&a); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `brand` and `cpu` are never read [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 27 | struct Huawei { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 28 | brand: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 29 | cpu: String, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `call` is never used [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:32:12 [INFO] [stdout] | [INFO] [stdout] 31 | trait Phone { [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 32 | fn call(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mm` [INFO] [stdout] --> bin/chapter22/chapter22_1.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let mm = v2.iter().filter(|x| **x > 100).collect::>(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_mm` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bin/chapter22/chapter22_1.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let mut r = Range {counter: 0}; [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: value assigned to `a` is never read [INFO] [stdout] --> bin/chapter07/chapter07_2.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | a = a + 1; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let s = "hello"; // 字符串类型 [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: `c` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let c = 'h'; // 字符类型 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let d = 200; // 整型 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let f = 2.14; // 浮点数 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let b = true; // 布尔类型 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c1` [INFO] [stdout] --> bin/chapter20/chapter20_2.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let c1 = c.get(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_c1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c2` [INFO] [stdout] --> bin/chapter20/chapter20_2.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let c2 = &c; // 即使不可变引用 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_c2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> bin/chapter20/chapter20_2.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 15 | struct Person { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 16 | name : String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::btree_map::Keys` [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::btree_map::Keys, panic, sync::{Arc, Mutex}, thread::{self, sleep}, time::Duration}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | / /// Send与Sync都是标记trait 无需实现方法 [INFO] [stdout] 98 | | /// 实现了Send trait的类型T,其可以所有权可以在线程间移动 [INFO] [stdout] 99 | | /// https://doc.rust-lang.org/std/marker/traitSend.html [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] 100 | [INFO] [stdout] 101 | let s = String::from("你好"); [INFO] [stdout] | ----------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | / /// Rc的线程安全版本,因为是原子操作进行引用计数,它不如Rc的性能 [INFO] [stdout] 118 | | /// 它提供在堆中分配的T类型值的共享所有权,共享引用是不能修改,不能获得对Arc内部某些内容的可变引用,如果修改Arc里面的值,请使用Mutex、RwLock或Atomic [INFO] [stdout] | |________________________________________________________________________________________________________________________________________________________^ [INFO] [stdout] 119 | let arc = std::sync::Arc::new([100,200,300]); [INFO] [stdout] | --------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | / /// 实现了Sync的类型T,可以在线程间共享引用&T,其引用&T也实现了Send trait [INFO] [stdout] 133 | | /// 如果T实现了Sync,则&T实现了Send,如果&T实现了Send,则T实现了Sync [INFO] [stdout] 134 | | /// https://doc.rust-lang.org/std/marker/trait.Sync.html [INFO] [stdout] 135 | | /// 大部分类型都实现了Send/Sync 完全有Send/Sync类型组成的新类型会自动实现Send/Sync 自己手动实现是不安全的,涉及unsafe编程,所以不推荐 [INFO] [stdout] ... | [INFO] [stdout] 139 | | /// Weak 实现了Send,没有实现Sync [INFO] [stdout] 140 | | /// Cell/OnceCell /RefCell没有实现Sync [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] 141 | // Arc与Mutex [INFO] [stdout] 142 | let ll = Arc::new(Mutex::new(0)); [INFO] [stdout] | --------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> bin/chapter06/chapter06_3.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let a: u8 = foo(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> bin/chapter06/chapter06_3.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let c = foo2(1, 2); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bar` is never used [INFO] [stdout] --> bin/chapter06/chapter06_3.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn bar() -> ! { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bin/chapter21/chapter21_1.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let mut dq2 = VecDeque::from([100,300]); [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: variable does not need to be mutable [INFO] [stdout] --> bin/chapter21/chapter21_1.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let mut dq2 = VecDeque::from([100,300]); [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: unused variable: `c` [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | let c = m.try_lock(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let a = Box::new(5); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bb` [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let bb = a.clone(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_bb` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `cc` [INFO] [stdout] --> bin/chapter20/chapter20_1.rs:66:9 [INFO] [stdout] | [INFO] [stdout] 66 | let cc = Rc::clone(&a); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_cc` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> bin/chapter16/chapter16_2.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 4 | struct Student { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 5 | name: String, [INFO] [stdout] 6 | age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Phone` is never used [INFO] [stdout] --> bin/chapter19/chapter19_2.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | trait Phone { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Xiaomi` is never constructed [INFO] [stdout] --> bin/chapter19/chapter19_2.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct Xiaomi; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Unkown` is never constructed [INFO] [stdout] --> bin/chapter17/chapter17_1.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 8 | enum Gender { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 11 | Unkown, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Gender` 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: variants `Monday`, `TuesDay`, `WednessDay`, `Thursday`, `Saturday`, and `Sunday` are never constructed [INFO] [stdout] --> bin/chapter17/chapter17_1.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 15 | enum Week { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 16 | Monday = 10, // 指定数值,默认是从零开始 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 17 | TuesDay, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 18 | WednessDay, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 19 | Thursday = 16, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 20 | Friday, [INFO] [stdout] 21 | Saturday, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 22 | Sunday, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Week` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Center` and `Other` are never constructed [INFO] [stdout] --> bin/chapter17/chapter17_1.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 26 | enum Page { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 29 | Center(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 30 | Other, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Page` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Hello` is never used [INFO] [stdout] --> bin/chapter18/chapter18_2.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | trait Hello { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `buy_phone` is never used [INFO] [stdout] --> bin/chapter18/chapter18_2.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | fn buy_phone(mone: u32) -> impl Phone { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `API_URL` is never used [INFO] [stdout] --> bin/chapter05/chapter05_4.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | static mut API_URL: i32 = 1; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_fn` is never used [INFO] [stdout] --> bin/chapter25/chapter25_1.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn call_fn(f: T) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_fn_mut` is never used [INFO] [stdout] --> bin/chapter25/chapter25_1.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn call_fn_mut(mut f: T) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_fn_once` is never used [INFO] [stdout] --> bin/chapter25/chapter25_1.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn call_fn_once(f: T) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Phone` is never used [INFO] [stdout] --> bin/chapter19/chapter19_2.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | trait Phone { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Xiaomi` is never constructed [INFO] [stdout] --> bin/chapter19/chapter19_2.rs:15:8 [INFO] [stdout] | [INFO] [stdout] 15 | struct Xiaomi; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arr1` [INFO] [stdout] --> bin/chapter12/chapter12_1.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let arr1: [u8;5] = [10,30,40,50,60]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_arr1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arr1` [INFO] [stdout] --> bin/chapter12/chapter12_1.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let arr1 = [10.50,50.2]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_arr1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `collections::btree_map::Keys` [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{collections::btree_map::Keys, panic, sync::{Arc, Mutex}, thread::{self, sleep}, time::Duration}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:97:5 [INFO] [stdout] | [INFO] [stdout] 97 | / /// Send与Sync都是标记trait 无需实现方法 [INFO] [stdout] 98 | | /// 实现了Send trait的类型T,其可以所有权可以在线程间移动 [INFO] [stdout] 99 | | /// https://doc.rust-lang.org/std/marker/traitSend.html [INFO] [stdout] | |___________________________________________________________^ [INFO] [stdout] 100 | [INFO] [stdout] 101 | let s = String::from("你好"); [INFO] [stdout] | ----------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:117:5 [INFO] [stdout] | [INFO] [stdout] 117 | / /// Rc的线程安全版本,因为是原子操作进行引用计数,它不如Rc的性能 [INFO] [stdout] 118 | | /// 它提供在堆中分配的T类型值的共享所有权,共享引用是不能修改,不能获得对Arc内部某些内容的可变引用,如果修改Arc里面的值,请使用Mutex、RwLock或Atomic [INFO] [stdout] | |________________________________________________________________________________________________________________________________________________________^ [INFO] [stdout] 119 | let arc = std::sync::Arc::new([100,200,300]); [INFO] [stdout] | --------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:132:5 [INFO] [stdout] | [INFO] [stdout] 132 | / /// 实现了Sync的类型T,可以在线程间共享引用&T,其引用&T也实现了Send trait [INFO] [stdout] 133 | | /// 如果T实现了Sync,则&T实现了Send,如果&T实现了Send,则T实现了Sync [INFO] [stdout] 134 | | /// https://doc.rust-lang.org/std/marker/trait.Sync.html [INFO] [stdout] 135 | | /// 大部分类型都实现了Send/Sync 完全有Send/Sync类型组成的新类型会自动实现Send/Sync 自己手动实现是不安全的,涉及unsafe编程,所以不推荐 [INFO] [stdout] ... | [INFO] [stdout] 139 | | /// Weak 实现了Send,没有实现Sync [INFO] [stdout] 140 | | /// Cell/OnceCell /RefCell没有实现Sync [INFO] [stdout] | |___________________________________________________^ [INFO] [stdout] 141 | // Arc与Mutex [INFO] [stdout] 142 | let ll = Arc::new(Mutex::new(0)); [INFO] [stdout] | --------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s = "Hello world!"; [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: `s2` [INFO] [stdout] --> src/main.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let s2 = String::from("Hello"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::read` [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> bin/chapter28/chapter28_1.rs:176:9 [INFO] [stdout] | [INFO] [stdout] 176 | let c = m.try_lock(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> bin/chapter16/chapter16_2.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 4 | struct Student { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 5 | name: String, [INFO] [stdout] 6 | age: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_fn` is never used [INFO] [stdout] --> bin/chapter25/chapter25_1.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn call_fn(f: T) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_fn_mut` is never used [INFO] [stdout] --> bin/chapter25/chapter25_1.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn call_fn_mut(mut f: T) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_fn_once` is never used [INFO] [stdout] --> bin/chapter25/chapter25_1.rs:60:4 [INFO] [stdout] | [INFO] [stdout] 60 | fn call_fn_once(f: T) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `User` is more private than the item `MyError::WrongUser::user` [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:27:27 [INFO] [stdout] | [INFO] [stdout] 27 | WrongUser{idx: usize, user: User}, [INFO] [stdout] | ^^^^^^^^^^ field `MyError::WrongUser::user` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `User` is only usable at visibility `pub(crate)` [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | struct User { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data4` is never used [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn data4() -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data5` is never used [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn data5() -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data6` is never used [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn data6(n: usize) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ss` [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | let ss = String::from_utf8(bytes).unwrap(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ss` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:39:43 [INFO] [stdout] | [INFO] [stdout] 39 | println!("{:?}", content.starts_with(|c|{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Unkown` is never constructed [INFO] [stdout] --> bin/chapter17/chapter17_1.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 8 | enum Gender { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] ... [INFO] [stdout] 11 | Unkown, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Gender` 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: variants `Monday`, `TuesDay`, `WednessDay`, `Thursday`, `Saturday`, and `Sunday` are never constructed [INFO] [stdout] --> bin/chapter17/chapter17_1.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 15 | enum Week { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 16 | Monday = 10, // 指定数值,默认是从零开始 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 17 | TuesDay, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 18 | WednessDay, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 19 | Thursday = 16, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 20 | Friday, [INFO] [stdout] 21 | Saturday, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 22 | Sunday, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Week` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Center` and `Other` are never constructed [INFO] [stdout] --> bin/chapter17/chapter17_1.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 26 | enum Page { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] ... [INFO] [stdout] 29 | Center(String), [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 30 | Other, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Page` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let mut name = "张三".chars(); [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: variable does not need to be mutable [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let mut name = "张三".chars(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c1` [INFO] [stdout] --> bin/chapter20/chapter20_2.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let c1 = c.get(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_c1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c2` [INFO] [stdout] --> bin/chapter20/chapter20_2.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let c2 = &c; // 即使不可变引用 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_c2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Male` and `Unknown` are never constructed [INFO] [stdout] --> bin/chapter24/chapter24_1.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 46 | enum Gender { [INFO] [stdout] | ------ variants in this enum [INFO] [stdout] 47 | Female, [INFO] [stdout] 48 | Male, [INFO] [stdout] | ^^^^ [INFO] [stdout] 49 | Unknown, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `a` is never read [INFO] [stdout] --> bin/chapter30/chapter30_1.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 9 | struct H { [INFO] [stdout] | - field in this struct [INFO] [stdout] 10 | a: usize [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Point` is never used [INFO] [stdout] --> bin/chapter06/chapter06_4.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | type Point = (u8,u8,u8); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `mm` [INFO] [stdout] --> bin/chapter22/chapter22_1.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let mm = v2.iter().filter(|x| **x > 100).collect::>(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_mm` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let s = "hello"; // 字符串类型 [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: `c` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let c = 'h'; // 字符类型 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let d = 200; // 整型 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let f = 2.14; // 浮点数 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter04/chapter04_1.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let b = true; // 布尔类型 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bin/chapter22/chapter22_1.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let mut r = Range {counter: 0}; [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: unused variable: `n1` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | let n1: u8 = 20; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n2` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | let n2 = 20; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n3` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | let n3 = 100_000_00; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n4` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:14:7 [INFO] [stdout] | [INFO] [stdout] 14 | let n4 = 100_000_00u32; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:16:7 [INFO] [stdout] | [INFO] [stdout] 16 | let a = 0b100; // 二进制 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:18:7 [INFO] [stdout] | [INFO] [stdout] 18 | let c = 0xaaaa; // 十六进制 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:20:7 [INFO] [stdout] | [INFO] [stdout] 20 | let d = b'a'; // 将字符转换成数值 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:21:7 [INFO] [stdout] | [INFO] [stdout] 21 | let e = b"hello xingxing2.comn"; // 数值的引用,本质上是一个字节序列 &[u8;长度] [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let b = 200u8.checked_add(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let b = u8::MAX.overflowing_add(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let b = u8::MAX.saturating_add(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t2` [INFO] [stdout] --> bin/chapter15/chapter15_1.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let t2 = (32,); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_t2` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t3` [INFO] [stdout] --> bin/chapter15/chapter15_1.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let t3 = ((3,4),false); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_t3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bin/chapter16/chapter16_1.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let mut stu2 = Student { [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: field `address` is never read [INFO] [stdout] --> bin/chapter16/chapter16_1.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 6 | struct Student { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 9 | address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Student` 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 `Car` is never constructed [INFO] [stdout] --> bin/chapter16/chapter16_1.rs:65:12 [INFO] [stdout] | [INFO] [stdout] 65 | struct Car; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ss` [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:104:9 [INFO] [stdout] | [INFO] [stdout] 104 | let ss = String::from_utf8(bytes).unwrap(); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ss` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:39:43 [INFO] [stdout] | [INFO] [stdout] 39 | println!("{:?}", content.starts_with(|c|{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `API_URL` is never used [INFO] [stdout] --> bin/chapter05/chapter05_4.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 10 | static mut API_URL: i32 = 1; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let mut name = "张三".chars(); [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: variable does not need to be mutable [INFO] [stdout] --> bin/chapter29/chapter29_1.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let mut name = "张三".chars(); [INFO] [stdout] | ----^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> bin/chapter16/chapter16_1.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let mut stu2 = Student { [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: field `address` is never read [INFO] [stdout] --> bin/chapter16/chapter16_1.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 6 | struct Student { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 9 | address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Student` 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: unused variable: `s` [INFO] [stdout] --> bin/chapter18/chapter18_3.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let s = buy_phone(600); [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: method `call` is never used [INFO] [stdout] --> bin/chapter18/chapter18_3.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 22 | trait Phone { [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 23 | fn call(&self); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `os` is never read [INFO] [stdout] --> bin/chapter18/chapter18_3.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 25 | struct Xiaomi { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 26 | os: String, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fs::read` [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fs::read; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> bin/chapter06/chapter06_3.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let a: u8 = foo(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> bin/chapter06/chapter06_3.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let c = foo2(1, 2); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `bar` is never used [INFO] [stdout] --> bin/chapter06/chapter06_3.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn bar() -> ! { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s = "Hello world!"; [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: `s2` [INFO] [stdout] --> src/main.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let s2 = String::from("Hello"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `a` is never read [INFO] [stdout] --> bin/chapter07/chapter07_2.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | a = a + 1; [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `Point` is never used [INFO] [stdout] --> bin/chapter06/chapter06_4.rs:19:10 [INFO] [stdout] | [INFO] [stdout] 19 | type Point = (u8,u8,u8); [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> bin/chapter18/chapter18_3.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let s = buy_phone(600); [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: method `call` is never used [INFO] [stdout] --> bin/chapter18/chapter18_3.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 22 | trait Phone { [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 23 | fn call(&self); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `os` is never read [INFO] [stdout] --> bin/chapter18/chapter18_3.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 25 | struct Xiaomi { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 26 | os: String, [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t2` [INFO] [stdout] --> bin/chapter15/chapter15_1.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let t2 = (32,); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_t2` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t3` [INFO] [stdout] --> bin/chapter15/chapter15_1.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let t3 = ((3,4),false); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_t3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Hello` is never used [INFO] [stdout] --> bin/chapter18/chapter18_2.rs:4:7 [INFO] [stdout] | [INFO] [stdout] 4 | trait Hello { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `buy_phone` is never used [INFO] [stdout] --> bin/chapter18/chapter18_2.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | fn buy_phone(mone: u32) -> impl Phone { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `User` is more private than the item `MyError::WrongUser::user` [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:27:27 [INFO] [stdout] | [INFO] [stdout] 27 | WrongUser{idx: usize, user: User}, [INFO] [stdout] | ^^^^^^^^^^ field `MyError::WrongUser::user` is reachable at visibility `pub` [INFO] [stdout] | [INFO] [stdout] note: but type `User` is only usable at visibility `pub(crate)` [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | struct User { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(private_interfaces)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data4` is never used [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | fn data4() -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data5` is never used [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:50:4 [INFO] [stdout] | [INFO] [stdout] 50 | fn data5() -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data6` is never used [INFO] [stdout] --> bin/chapter31/chapter31_1.rs:54:4 [INFO] [stdout] | [INFO] [stdout] 54 | fn data6(n: usize) -> anyhow::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arr1` [INFO] [stdout] --> bin/chapter12/chapter12_1.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let arr1: [u8;5] = [10,30,40,50,60]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_arr1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arr1` [INFO] [stdout] --> bin/chapter12/chapter12_1.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | let arr1 = [10.50,50.2]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_arr1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `call` is never used [INFO] [stdout] --> bin/chapter18/chapter18_5.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 2 | trait Phone{ [INFO] [stdout] | ----- method in this trait [INFO] [stdout] 3 | fn call(&self); [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] --> bin/chapter19/chapter19_1.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 26 | struct Event { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 27 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 28 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `hello_de` is never used [INFO] [stdout] --> bin/chapter19/chapter19_1.rs:41:12 [INFO] [stdout] | [INFO] [stdout] 40 | impl Value { [INFO] [stdout] | ---------------------------------- method in this implementation [INFO] [stdout] 41 | fn hello_de(&self) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `hello_i` is never used [INFO] [stdout] --> bin/chapter19/chapter19_1.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 45 | impl Value { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 46 | fn hello_i(&self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n1` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:8:7 [INFO] [stdout] | [INFO] [stdout] 8 | let n1: u8 = 20; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n2` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:10:7 [INFO] [stdout] | [INFO] [stdout] 10 | let n2 = 20; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n3` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | let n3 = 100_000_00; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n4` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:14:7 [INFO] [stdout] | [INFO] [stdout] 14 | let n4 = 100_000_00u32; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_n4` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:16:7 [INFO] [stdout] | [INFO] [stdout] 16 | let a = 0b100; // 二进制 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:18:7 [INFO] [stdout] | [INFO] [stdout] 18 | let c = 0xaaaa; // 十六进制 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `d` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:20:7 [INFO] [stdout] | [INFO] [stdout] 20 | let d = b'a'; // 将字符转换成数值 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:21:7 [INFO] [stdout] | [INFO] [stdout] 21 | let e = b"hello xingxing2.comn"; // 数值的引用,本质上是一个字节序列 &[u8;长度] [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let b = 200u8.checked_add(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:47:9 [INFO] [stdout] | [INFO] [stdout] 47 | let b = u8::MAX.overflowing_add(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> bin/chapter06/chapter06_1.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let b = u8::MAX.saturating_add(1); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.92s [INFO] running `Command { std: "docker" "inspect" "f5d63d50e208672b2886d5501c49f63c464e64be361685c9a0506a79e374806b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f5d63d50e208672b2886d5501c49f63c464e64be361685c9a0506a79e374806b", kill_on_drop: false }` [INFO] [stdout] f5d63d50e208672b2886d5501c49f63c464e64be361685c9a0506a79e374806b