[INFO] cloning repository https://github.com/sqlnice/learning-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/sqlnice/learning-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsqlnice%2Flearning-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsqlnice%2Flearning-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7d6897d80fff57d56f8507e27f3a84a438041e88 [INFO] building sqlnice/learning-rust against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fsqlnice%2Flearning-rust" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/sqlnice/learning-rust on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/sqlnice/learning-rust [INFO] finished tweaking git repo https://github.com/sqlnice/learning-rust [INFO] tweaked toml for git repo https://github.com/sqlnice/learning-rust written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/sqlnice/learning-rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] e4cf95ca3570a6729c11c86965a49bf8655d4ff68f7fb54aafc697360021783a [INFO] running `Command { std: "docker" "start" "-a" "e4cf95ca3570a6729c11c86965a49bf8655d4ff68f7fb54aafc697360021783a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "e4cf95ca3570a6729c11c86965a49bf8655d4ff68f7fb54aafc697360021783a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e4cf95ca3570a6729c11c86965a49bf8655d4ff68f7fb54aafc697360021783a", kill_on_drop: false }` [INFO] [stdout] e4cf95ca3570a6729c11c86965a49bf8655d4ff68f7fb54aafc697360021783a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 31c641287c4e20c318e34957ee3160f8a526b354d4f5d4dfcb7fc29eaf8e14e4 [INFO] running `Command { std: "docker" "start" "-a" "31c641287c4e20c318e34957ee3160f8a526b354d4f5d4dfcb7fc29eaf8e14e4", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.140 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.17 [INFO] [stderr] Compiling getrandom v0.2.8 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling learning-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `order1` [INFO] [stdout] --> src/lib.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let order1 = back_of_house::Appetizer::Soup; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_order1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deliver_order` is never used [INFO] [stdout] --> src/lib.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn deliver_order() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `eat_at_restaurant` is never used [INFO] [stdout] --> src/lib.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn eat_at_restaurant() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> src/lib.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `can_hold` is never used [INFO] [stdout] --> src/lib.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 61 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 62 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_to_waitlist` is never used [INFO] [stdout] --> src/front_of_house/hosting.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `seat_at_table` is never used [INFO] [stdout] --> src/front_of_house/hosting.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn seat_at_table() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_order` is never used [INFO] [stdout] --> src/front_of_house.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | fn take_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `serve_order` is never used [INFO] [stdout] --> src/front_of_house.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | fn serve_order() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_payment` is never used [INFO] [stdout] --> src/front_of_house.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | fn take_payment() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Appetizer` is never used [INFO] [stdout] --> src/lib.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | pub enum Appetizer { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fix_incorrect_order` is never used [INFO] [stdout] --> src/lib.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cook_order` is never used [INFO] [stdout] --> src/lib.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Breakfast` is never constructed [INFO] [stdout] --> src/lib.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct Breakfast { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `summer` is never used [INFO] [stdout] --> src/lib.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 33 | impl Breakfast { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 34 | pub fn summer(toast: &str) -> Breakfast { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::num` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `hash::Hash` [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | hash::Hash, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> src/main.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | io::{self, ErrorKind, Read}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Borrow` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | borrow::Borrow, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/main.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | let c = 'z'; [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: `z` [INFO] [stdout] --> src/main.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | let z: char = 'ℤ'; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heart_eyed_cat` [INFO] [stdout] --> src/main.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | let heart_eyed_cat = '😻'; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heart_eyed_cat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `five_hundred` [INFO] [stdout] --> src/main.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | let five_hundred = tup.0; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_five_hundred` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six_point_four` [INFO] [stdout] --> src/main.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | let six_point_four = tup.1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_six_point_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `one` [INFO] [stdout] --> src/main.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | let one = tup.2; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_one` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `months` [INFO] [stdout] --> src/main.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | let months: [&str; 12] = [ [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_months` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/main.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | let first = a[0]; // 使用索引访问 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | let y = 6; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/main.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let number = if condition { 5 } else { 6 }; // 分支返回的类型必须相同 [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/main.rs:281:9 [INFO] [stdout] | [INFO] [stdout] 281 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reference_to_nothing` [INFO] [stdout] --> src/main.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | let reference_to_nothing = no_dangle(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reference_to_nothing` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:344:9 [INFO] [stdout] | [INFO] [stdout] 344 | let mut s = String::from("hello world"); [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: `user3` [INFO] [stdout] --> src/main.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | let user3: User = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/main.rs:390:9 [INFO] [stdout] | [INFO] [stdout] 390 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `subject` [INFO] [stdout] --> src/main.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let subject = AlwaysEqual; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_subject` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/main.rs:463:9 [INFO] [stdout] | [INFO] [stdout] 463 | let four = IpAddrkind::V4(String::from("127.0.0.1")); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/main.rs:464:9 [INFO] [stdout] | [INFO] [stdout] 464 | let six = IpAddrkind::V6(String::from("::1")); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/main.rs:469:9 [INFO] [stdout] | [INFO] [stdout] 469 | let home = IpAddr::V4(127, 0, 0, 1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/main.rs:470:9 [INFO] [stdout] | [INFO] [stdout] 470 | let loopback = IpAddr::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/main.rs:498:9 [INFO] [stdout] | [INFO] [stdout] 498 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_char` [INFO] [stdout] --> src/main.rs:499:9 [INFO] [stdout] | [INFO] [stdout] 499 | let some_char = Some('e'); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/main.rs:500:9 [INFO] [stdout] | [INFO] [stdout] 500 | let absent_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/main.rs:545:9 [INFO] [stdout] | [INFO] [stdout] 545 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/main.rs:546:9 [INFO] [stdout] | [INFO] [stdout] 546 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/main.rs:612:9 [INFO] [stdout] | [INFO] [stdout] 612 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `third` [INFO] [stdout] --> src/main.rs:619:9 [INFO] [stdout] | [INFO] [stdout] 619 | let third = &v[2]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_third` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/main.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:648:9 [INFO] [stdout] | [INFO] [stdout] 648 | let s = data.to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:649:9 [INFO] [stdout] | [INFO] [stdout] 649 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:661:9 [INFO] [stdout] | [INFO] [stdout] 661 | let s = format!("{s1}-{s2}"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/main.rs:664:9 [INFO] [stdout] | [INFO] [stdout] 664 | let s1 = String::from("hello"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:669:9 [INFO] [stdout] | [INFO] [stdout] 669 | let s = &hello[0..4]; // Зд 每个字母长度为 2 字节 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file_result` [INFO] [stdout] --> src/main.rs:735:9 [INFO] [stdout] | [INFO] [stdout] 735 | let greeting_file_result = File::open("hello.txt"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/main.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | let greeting_file = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/main.rs:762:9 [INFO] [stdout] | [INFO] [stdout] 762 | let greeting_file = File::open("hello.txt").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/main.rs:764:9 [INFO] [stdout] | [INFO] [stdout] 764 | let greeting_file = [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/main.rs:834:9 [INFO] [stdout] | [INFO] [stdout] 834 | 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/main.rs:835:9 [INFO] [stdout] | [INFO] [stdout] 835 | 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: `item` [INFO] [stdout] --> src/main.rs:815:13 [INFO] [stdout] | [INFO] [stdout] 815 | for item in list { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:814:13 [INFO] [stdout] | [INFO] [stdout] 814 | let mut largest = &list[0]; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/main.rs:920:41 [INFO] [stdout] | [INFO] [stdout] 920 | pub fn notify(item: &T) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/main.rs:923:28 [INFO] [stdout] | [INFO] [stdout] 923 | fn some_function(t: &T, u: &U) [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/main.rs:923:35 [INFO] [stdout] | [INFO] [stdout] 923 | fn some_function(t: &T, u: &U) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:1002:9 [INFO] [stdout] | [INFO] [stdout] 1002 | let i = ImportantExcerpt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:1024:9 [INFO] [stdout] | [INFO] [stdout] 1024 | let s: &'static str = "I have a static lifetime"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:989:32 [INFO] [stdout] | [INFO] [stdout] 989 | fn longest<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:1112:9 [INFO] [stdout] | [INFO] [stdout] 1112 | let s = example_closure("Hello".to_string()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list` [INFO] [stdout] --> src/main.rs:1268:9 [INFO] [stdout] | [INFO] [stdout] 1268 | let list = Cons(1, Box::new(Cons(2, Box::new(Cons(3, Box::new(Nil)))))); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_list` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/main.rs:1321:9 [INFO] [stdout] | [INFO] [stdout] 1321 | let c = CustomSmartPointer { [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] --> src/main.rs:1324:9 [INFO] [stdout] | [INFO] [stdout] 1324 | let d = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/main.rs:1349:9 [INFO] [stdout] | [INFO] [stdout] 1349 | let b = Cons(3, Rc::clone(&a)); // 不会拷贝, 只会操作引用计数从 1 -> 2 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/main.rs:1352:13 [INFO] [stdout] | [INFO] [stdout] 1352 | let c = Cons(4, Rc::clone(&a)); // 不会拷贝, 只会操作引用计数从 2 -> 3 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `post` [INFO] [stdout] --> src/main.rs:1785:31 [INFO] [stdout] | [INFO] [stdout] 1785 | fn content<'a>(&self, post: &'a Post) -> &'a str { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_post` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:1871:9 [INFO] [stdout] | [INFO] [stdout] 1871 | let x = 5; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:1873:10 [INFO] [stdout] | [INFO] [stdout] 1873 | let (x, y, z) = (1, 2, 3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:1873:13 [INFO] [stdout] | [INFO] [stdout] 1873 | let (x, y, z) = (1, 2, 3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/main.rs:1873:16 [INFO] [stdout] | [INFO] [stdout] 1873 | let (x, y, z) = (1, 2, 3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:1876:12 [INFO] [stdout] | [INFO] [stdout] 1876 | fn foo(x: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:2021:9 [INFO] [stdout] | [INFO] [stdout] 2021 | let y = 10; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/main.rs:2167:9 [INFO] [stdout] | [INFO] [stdout] 2167 | let f: Thunk = Box::new(|| println!("hi")); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/main.rs:2168:24 [INFO] [stdout] | [INFO] [stdout] 2168 | fn takes_long_type(f: Thunk) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/main.rs:2211:9 [INFO] [stdout] | [INFO] [stdout] 2211 | let v: Vec = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `guess_number` is never used [INFO] [stdout] --> src/main.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn guess_number() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `variables_and_mutability` is never used [INFO] [stdout] --> src/main.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn variables_and_mutability() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data_types` is never used [INFO] [stdout] --> src/main.rs:122:4 [INFO] [stdout] | [INFO] [stdout] 122 | fn data_types() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `another_function` is never used [INFO] [stdout] --> src/main.rs:166:4 [INFO] [stdout] | [INFO] [stdout] 166 | fn another_function(x: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `control_flow` is never used [INFO] [stdout] --> src/main.rs:192:4 [INFO] [stdout] | [INFO] [stdout] 192 | fn control_flow() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ownership` is never used [INFO] [stdout] --> src/main.rs:272:4 [INFO] [stdout] | [INFO] [stdout] 272 | fn ownership() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `references_and_borrowing` is never used [INFO] [stdout] --> src/main.rs:312:4 [INFO] [stdout] | [INFO] [stdout] 312 | fn references_and_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `slices` is never used [INFO] [stdout] --> src/main.rs:343:4 [INFO] [stdout] | [INFO] [stdout] 343 | fn slices() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `defining_structs` is never used [INFO] [stdout] --> src/main.rs:359:4 [INFO] [stdout] | [INFO] [stdout] 359 | fn defining_structs() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `example_structs` is never used [INFO] [stdout] --> src/main.rs:397:4 [INFO] [stdout] | [INFO] [stdout] 397 | fn example_structs() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `method_syntax` is never used [INFO] [stdout] --> src/main.rs:417:4 [INFO] [stdout] | [INFO] [stdout] 417 | fn method_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `area` is never used [INFO] [stdout] --> src/main.rs:424:12 [INFO] [stdout] | [INFO] [stdout] 423 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 424 | fn area(self: &Self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `can_hold` and `square` are never used [INFO] [stdout] --> src/main.rs:429:12 [INFO] [stdout] | [INFO] [stdout] 428 | impl Rectangle { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 429 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 432 | fn square(size: u32) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `defining_an_enum` is never used [INFO] [stdout] --> src/main.rs:458:4 [INFO] [stdout] | [INFO] [stdout] 458 | fn defining_an_enum() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `call` is never used [INFO] [stdout] --> src/main.rs:490:12 [INFO] [stdout] | [INFO] [stdout] 489 | impl Message { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 490 | fn call(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `match_flow` is never used [INFO] [stdout] --> src/main.rs:505:4 [INFO] [stdout] | [INFO] [stdout] 505 | fn match_flow() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `if_let` is never used [INFO] [stdout] --> src/main.rs:564:4 [INFO] [stdout] | [INFO] [stdout] 564 | fn if_let() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `defining_modules_to_control_scope_and_privacy` is never used [INFO] [stdout] --> src/main.rs:594:4 [INFO] [stdout] | [INFO] [stdout] 594 | fn defining_modules_to_control_scope_and_privacy() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `paths_for_referring_to_an_item_in_the_module_tree` is never used [INFO] [stdout] --> src/main.rs:599:4 [INFO] [stdout] | [INFO] [stdout] 599 | fn paths_for_referring_to_an_item_in_the_module_tree() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `vectors` is never used [INFO] [stdout] --> src/main.rs:611:4 [INFO] [stdout] | [INFO] [stdout] 611 | fn vectors() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `strings` is never used [INFO] [stdout] --> src/main.rs:645:4 [INFO] [stdout] | [INFO] [stdout] 645 | fn strings() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hash_maps` is never used [INFO] [stdout] --> src/main.rs:687:4 [INFO] [stdout] | [INFO] [stdout] 687 | fn hash_maps() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unrecoverable_errors_with_panic` is never used [INFO] [stdout] --> src/main.rs:728:4 [INFO] [stdout] | [INFO] [stdout] 728 | fn unrecoverable_errors_with_panic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `recoverable_errors_with_result` is never used [INFO] [stdout] --> src/main.rs:734:4 [INFO] [stdout] | [INFO] [stdout] 734 | fn recoverable_errors_with_result() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_panic_or_not_to_panic` is never used [INFO] [stdout] --> src/main.rs:803:4 [INFO] [stdout] | [INFO] [stdout] 803 | fn to_panic_or_not_to_panic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `syntax` is never used [INFO] [stdout] --> src/main.rs:811:4 [INFO] [stdout] | [INFO] [stdout] 811 | fn syntax() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `x` is never used [INFO] [stdout] --> src/main.rs:848:12 [INFO] [stdout] | [INFO] [stdout] 847 | impl Point { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] 848 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `distance_from_origin` is never used [INFO] [stdout] --> src/main.rs:857:12 [INFO] [stdout] | [INFO] [stdout] 856 | impl Point { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 857 | fn distance_from_origin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `traits` is never used [INFO] [stdout] --> src/main.rs:865:4 [INFO] [stdout] | [INFO] [stdout] 865 | fn traits() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `summarize` is never used [INFO] [stdout] --> src/main.rs:869:12 [INFO] [stdout] | [INFO] [stdout] 868 | pub trait Summary { [INFO] [stdout] | ------- method in this trait [INFO] [stdout] 869 | fn summarize(&self) -> String; // 一行一个方法签名且都以分号结尾 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `content` is never read [INFO] [stdout] --> src/main.rs:877:13 [INFO] [stdout] | [INFO] [stdout] 873 | pub struct NewsArticle { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 877 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `reply` and `retweet` are never read [INFO] [stdout] --> src/main.rs:887:13 [INFO] [stdout] | [INFO] [stdout] 884 | pub struct Tweet { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 887 | pub reply: bool, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 888 | pub retweet: bool, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:944:12 [INFO] [stdout] | [INFO] [stdout] 943 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 944 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/main.rs:949:12 [INFO] [stdout] | [INFO] [stdout] 948 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 949 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lifetime_syntax` is never used [INFO] [stdout] --> src/main.rs:960:4 [INFO] [stdout] | [INFO] [stdout] 960 | fn lifetime_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `announce_and_return_part` is never used [INFO] [stdout] --> src/main.rs:1017:12 [INFO] [stdout] | [INFO] [stdout] 1016 | impl<'a> ImportantExcerpt<'a> { [INFO] [stdout] | ----------------------------- method in this implementation [INFO] [stdout] 1017 | fn announce_and_return_part(&self, announcement: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `wirting_tests` is never used [INFO] [stdout] --> src/main.rs:1041:4 [INFO] [stdout] | [INFO] [stdout] 1041 | fn wirting_tests() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `running_tests` is never used [INFO] [stdout] --> src/main.rs:1056:4 [INFO] [stdout] | [INFO] [stdout] 1056 | fn running_tests() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `closures` is never used [INFO] [stdout] --> src/main.rs:1059:4 [INFO] [stdout] | [INFO] [stdout] 1059 | fn closures() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `giveaway` and `most_stocked` are never used [INFO] [stdout] --> src/main.rs:1072:12 [INFO] [stdout] | [INFO] [stdout] 1071 | impl Inventory { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 1072 | fn giveaway(&self, user_perference: Option) -> ShirtColor { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1077 | fn most_stocked(&self) -> ShirtColor { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iterators` is never used [INFO] [stdout] --> src/main.rs:1145:4 [INFO] [stdout] | [INFO] [stdout] 1145 | fn iterators() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `performance` is never used [INFO] [stdout] --> src/main.rs:1231:4 [INFO] [stdout] | [INFO] [stdout] 1231 | fn performance() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `release_profiles` is never used [INFO] [stdout] --> src/main.rs:1236:4 [INFO] [stdout] | [INFO] [stdout] 1236 | fn release_profiles() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cargo_workspace` is never used [INFO] [stdout] --> src/main.rs:1241:4 [INFO] [stdout] | [INFO] [stdout] 1241 | fn cargo_workspace() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `re_box` is never used [INFO] [stdout] --> src/main.rs:1250:4 [INFO] [stdout] | [INFO] [stdout] 1250 | fn re_box() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deref` is never used [INFO] [stdout] --> src/main.rs:1273:4 [INFO] [stdout] | [INFO] [stdout] 1273 | fn deref() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:1293:12 [INFO] [stdout] | [INFO] [stdout] 1292 | impl MyBox { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 1293 | fn new(x: T) -> MyBox { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `re_drop` is never used [INFO] [stdout] --> src/main.rs:1312:4 [INFO] [stdout] | [INFO] [stdout] 1312 | fn re_drop() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rc` is never used [INFO] [stdout] --> src/main.rs:1340:4 [INFO] [stdout] | [INFO] [stdout] 1340 | fn rc() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `interior_mutability` is never used [INFO] [stdout] --> src/main.rs:1358:4 [INFO] [stdout] | [INFO] [stdout] 1358 | fn interior_mutability() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reference_cycles` is never used [INFO] [stdout] --> src/main.rs:1372:4 [INFO] [stdout] | [INFO] [stdout] 1372 | fn reference_cycles() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `tail` is never used [INFO] [stdout] --> src/main.rs:1383:12 [INFO] [stdout] | [INFO] [stdout] 1382 | impl List { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 1383 | fn tail(&self) -> Option<&RefCell>> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `threads` is never used [INFO] [stdout] --> src/main.rs:1481:4 [INFO] [stdout] | [INFO] [stdout] 1481 | fn threads() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `message_passing` is never used [INFO] [stdout] --> src/main.rs:1523:4 [INFO] [stdout] | [INFO] [stdout] 1523 | fn message_passing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shared_state` is never used [INFO] [stdout] --> src/main.rs:1600:4 [INFO] [stdout] | [INFO] [stdout] 1600 | fn shared_state() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `extensible_concurrency_sync_and_send` is never used [INFO] [stdout] --> src/main.rs:1633:4 [INFO] [stdout] | [INFO] [stdout] 1633 | fn extensible_concurrency_sync_and_send() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `what_is_oo` is never used [INFO] [stdout] --> src/main.rs:1647:4 [INFO] [stdout] | [INFO] [stdout] 1647 | fn what_is_oo() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `add`, `remove`, `average`, and `update_average` are never used [INFO] [stdout] --> src/main.rs:1659:16 [INFO] [stdout] | [INFO] [stdout] 1658 | impl AverageCollection { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] 1659 | pub fn add(&mut self, value: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 1663 | pub fn remove(&mut self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1673 | pub fn average(&self) -> f64 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1676 | fn update_average(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `trait_objects` is never used [INFO] [stdout] --> src/main.rs:1694:4 [INFO] [stdout] | [INFO] [stdout] 1694 | fn trait_objects() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `draw` is never used [INFO] [stdout] --> src/main.rs:1697:12 [INFO] [stdout] | [INFO] [stdout] 1696 | pub trait Draw { [INFO] [stdout] | ---- method in this trait [INFO] [stdout] 1697 | fn draw(&self) {} [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run` is never used [INFO] [stdout] --> src/main.rs:1704:16 [INFO] [stdout] | [INFO] [stdout] 1703 | impl Screen { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 1704 | pub fn run(&self) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `width`, `height`, and `label` are never read [INFO] [stdout] --> src/main.rs:1712:13 [INFO] [stdout] | [INFO] [stdout] 1711 | pub struct Button { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 1712 | pub width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 1713 | pub height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 1714 | pub label: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `width`, `height`, and `options` are never read [INFO] [stdout] --> src/main.rs:1722:9 [INFO] [stdout] | [INFO] [stdout] 1721 | pub struct SelectBox { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 1722 | width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 1723 | height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 1724 | options: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `oo_design_patterns` is never used [INFO] [stdout] --> src/main.rs:1751:4 [INFO] [stdout] | [INFO] [stdout] 1751 | fn oo_design_patterns() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_text`, `content`, `request_review`, and `approve` are never used [INFO] [stdout] --> src/main.rs:1759:16 [INFO] [stdout] | [INFO] [stdout] 1758 | impl Post { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 1759 | pub fn new() -> Post { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 1765 | pub fn add_text(&mut self, text: &str) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1768 | pub fn content(&self) -> &str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1771 | pub fn request_review(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1776 | pub fn approve(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `all_the_places_for_patterns` is never used [INFO] [stdout] --> src/main.rs:1830:4 [INFO] [stdout] | [INFO] [stdout] 1830 | fn all_the_places_for_patterns() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `refutability` is never used [INFO] [stdout] --> src/main.rs:1885:4 [INFO] [stdout] | [INFO] [stdout] 1885 | fn refutability() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pattern_syntax` is never used [INFO] [stdout] --> src/main.rs:1894:4 [INFO] [stdout] | [INFO] [stdout] 1894 | fn pattern_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unsafe_rust` is never used [INFO] [stdout] --> src/main.rs:2065:4 [INFO] [stdout] | [INFO] [stdout] 2065 | fn unsafe_rust() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `advanced_traits` is never used [INFO] [stdout] --> src/main.rs:2156:4 [INFO] [stdout] | [INFO] [stdout] 2156 | fn advanced_traits() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `advanced_types` is never used [INFO] [stdout] --> src/main.rs:2159:4 [INFO] [stdout] | [INFO] [stdout] 2159 | fn advanced_types() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_closure` is never used [INFO] [stdout] --> src/main.rs:2191:8 [INFO] [stdout] | [INFO] [stdout] 2191 | fn returns_closure() -> Box i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `macros` is never used [INFO] [stdout] --> src/main.rs:2197:4 [INFO] [stdout] | [INFO] [stdout] 2197 | fn macros() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `abs` is never used [INFO] [stdout] --> src/main.rs:2132:12 [INFO] [stdout] | [INFO] [stdout] 2132 | fn abs(input: i32) -> i32; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Alaska` should have a snake case name [INFO] [stdout] --> src/main.rs:533:9 [INFO] [stdout] | [INFO] [stdout] 533 | let Alaska = Coin::Quarter(UsState::Alaska); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `alaska` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:2148:38 [INFO] [stdout] | [INFO] [stdout] 2148 | unsafe { println!("COUNTER: {}", COUNTER) } [INFO] [stdout] | ^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.13s [INFO] running `Command { std: "docker" "inspect" "31c641287c4e20c318e34957ee3160f8a526b354d4f5d4dfcb7fc29eaf8e14e4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "31c641287c4e20c318e34957ee3160f8a526b354d4f5d4dfcb7fc29eaf8e14e4", kill_on_drop: false }` [INFO] [stdout] 31c641287c4e20c318e34957ee3160f8a526b354d4f5d4dfcb7fc29eaf8e14e4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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 -Dtail-expr-drop-order" "-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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e6fa135eeb1fe0eb4a17072ada062f4d58b3f41473cce5f96a484ce8313c0ba4 [INFO] running `Command { std: "docker" "start" "-a" "e6fa135eeb1fe0eb4a17072ada062f4d58b3f41473cce5f96a484ce8313c0ba4", kill_on_drop: false }` [INFO] [stderr] Compiling learning-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `order1` [INFO] [stdout] --> src/lib.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let order1 = back_of_house::Appetizer::Soup; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_order1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deliver_order` is never used [INFO] [stdout] --> src/lib.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn deliver_order() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `eat_at_restaurant` is never used [INFO] [stdout] --> src/lib.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn eat_at_restaurant() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> src/lib.rs:56:8 [INFO] [stdout] | [INFO] [stdout] 56 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `can_hold` is never used [INFO] [stdout] --> src/lib.rs:62:8 [INFO] [stdout] | [INFO] [stdout] 61 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 62 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_to_waitlist` is never used [INFO] [stdout] --> src/front_of_house/hosting.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `seat_at_table` is never used [INFO] [stdout] --> src/front_of_house/hosting.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn seat_at_table() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_order` is never used [INFO] [stdout] --> src/front_of_house.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | fn take_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `serve_order` is never used [INFO] [stdout] --> src/front_of_house.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | fn serve_order() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_payment` is never used [INFO] [stdout] --> src/front_of_house.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | fn take_payment() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Appetizer` is never used [INFO] [stdout] --> src/lib.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | pub enum Appetizer { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fix_incorrect_order` is never used [INFO] [stdout] --> src/lib.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cook_order` is never used [INFO] [stdout] --> src/lib.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Breakfast` is never constructed [INFO] [stdout] --> src/lib.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct Breakfast { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `summer` is never used [INFO] [stdout] --> src/lib.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 33 | impl Breakfast { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 34 | pub fn summer(toast: &str) -> Breakfast { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `order1` [INFO] [stdout] --> src/lib.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let order1 = back_of_house::Appetizer::Soup; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_order1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::num` [INFO] [stdout] --> src/main.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use core::num; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `hash::Hash` [INFO] [stdout] --> src/main.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | hash::Hash, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deliver_order` is never used [INFO] [stdout] --> src/lib.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn deliver_order() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `eat_at_restaurant` is never used [INFO] [stdout] --> src/lib.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | fn eat_at_restaurant() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_to_waitlist` is never used [INFO] [stdout] --> src/front_of_house/hosting.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `seat_at_table` is never used [INFO] [stdout] --> src/front_of_house/hosting.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn seat_at_table() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_order` is never used [INFO] [stdout] --> src/front_of_house.rs:4:8 [INFO] [stdout] | [INFO] [stdout] 4 | fn take_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `serve_order` is never used [INFO] [stdout] --> src/front_of_house.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | fn serve_order() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_payment` is never used [INFO] [stdout] --> src/front_of_house.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | fn take_payment() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Appetizer` is never used [INFO] [stdout] --> src/lib.rs:19:14 [INFO] [stdout] | [INFO] [stdout] 19 | pub enum Appetizer { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `fix_incorrect_order` is never used [INFO] [stdout] --> src/lib.rs:23:8 [INFO] [stdout] | [INFO] [stdout] 23 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cook_order` is never used [INFO] [stdout] --> src/lib.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Breakfast` is never constructed [INFO] [stdout] --> src/lib.rs:29:16 [INFO] [stdout] | [INFO] [stdout] 29 | pub struct Breakfast { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `summer` is never used [INFO] [stdout] --> src/lib.rs:34:16 [INFO] [stdout] | [INFO] [stdout] 33 | impl Breakfast { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] 34 | pub fn summer(toast: &str) -> Breakfast { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: cannot test inner items [INFO] [stdout] --> src/main.rs:1159:5 [INFO] [stdout] | [INFO] [stdout] 1159 | #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unnameable_test_items)]` on by default [INFO] [stdout] = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: cannot test inner items [INFO] [stdout] --> src/main.rs:1170:5 [INFO] [stdout] | [INFO] [stdout] 1170 | #[test] [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the attribute macro `test` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> src/main.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | io::{self, ErrorKind, Read}, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `borrow::Borrow` [INFO] [stdout] --> src/main.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | borrow::Borrow, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/main.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | let c = 'z'; [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: `z` [INFO] [stdout] --> src/main.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | let z: char = 'ℤ'; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `heart_eyed_cat` [INFO] [stdout] --> src/main.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | let heart_eyed_cat = '😻'; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_heart_eyed_cat` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `five_hundred` [INFO] [stdout] --> src/main.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | let five_hundred = tup.0; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_five_hundred` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six_point_four` [INFO] [stdout] --> src/main.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | let six_point_four = tup.1; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_six_point_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `one` [INFO] [stdout] --> src/main.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | let one = tup.2; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_one` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `months` [INFO] [stdout] --> src/main.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | let months: [&str; 12] = [ [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_months` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `first` [INFO] [stdout] --> src/main.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 163 | let first = a[0]; // 使用索引访问 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_first` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | let y = 6; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> src/main.rs:206:9 [INFO] [stdout] | [INFO] [stdout] 206 | let number = if condition { 5 } else { 6 }; // 分支返回的类型必须相同 [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/main.rs:281:9 [INFO] [stdout] | [INFO] [stdout] 281 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reference_to_nothing` [INFO] [stdout] --> src/main.rs:330:9 [INFO] [stdout] | [INFO] [stdout] 330 | let reference_to_nothing = no_dangle(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reference_to_nothing` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:344:9 [INFO] [stdout] | [INFO] [stdout] 344 | let mut s = String::from("hello world"); [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: `user3` [INFO] [stdout] --> src/main.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | let user3: User = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/main.rs:390:9 [INFO] [stdout] | [INFO] [stdout] 390 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `subject` [INFO] [stdout] --> src/main.rs:394:9 [INFO] [stdout] | [INFO] [stdout] 394 | let subject = AlwaysEqual; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_subject` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `four` [INFO] [stdout] --> src/main.rs:463:9 [INFO] [stdout] | [INFO] [stdout] 463 | let four = IpAddrkind::V4(String::from("127.0.0.1")); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_four` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/main.rs:464:9 [INFO] [stdout] | [INFO] [stdout] 464 | let six = IpAddrkind::V6(String::from("::1")); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `home` [INFO] [stdout] --> src/main.rs:469:9 [INFO] [stdout] | [INFO] [stdout] 469 | let home = IpAddr::V4(127, 0, 0, 1); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_home` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `loopback` [INFO] [stdout] --> src/main.rs:470:9 [INFO] [stdout] | [INFO] [stdout] 470 | let loopback = IpAddr::V6(String::from("::1")); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_loopback` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/main.rs:498:9 [INFO] [stdout] | [INFO] [stdout] 498 | let some_number = Some(5); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_char` [INFO] [stdout] --> src/main.rs:499:9 [INFO] [stdout] | [INFO] [stdout] 499 | let some_char = Some('e'); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_char` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/main.rs:500:9 [INFO] [stdout] | [INFO] [stdout] 500 | let absent_number: Option = None; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/main.rs:545:9 [INFO] [stdout] | [INFO] [stdout] 545 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/main.rs:546:9 [INFO] [stdout] | [INFO] [stdout] 546 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/main.rs:612:9 [INFO] [stdout] | [INFO] [stdout] 612 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `third` [INFO] [stdout] --> src/main.rs:619:9 [INFO] [stdout] | [INFO] [stdout] 619 | let third = &v[2]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_third` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/main.rs:637:9 [INFO] [stdout] | [INFO] [stdout] 637 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:648:9 [INFO] [stdout] | [INFO] [stdout] 648 | let s = data.to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:649:9 [INFO] [stdout] | [INFO] [stdout] 649 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:661:9 [INFO] [stdout] | [INFO] [stdout] 661 | let s = format!("{s1}-{s2}"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/main.rs:664:9 [INFO] [stdout] | [INFO] [stdout] 664 | let s1 = String::from("hello"); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:669:9 [INFO] [stdout] | [INFO] [stdout] 669 | let s = &hello[0..4]; // Зд 每个字母长度为 2 字节 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file_result` [INFO] [stdout] --> src/main.rs:735:9 [INFO] [stdout] | [INFO] [stdout] 735 | let greeting_file_result = File::open("hello.txt"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file_result` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/main.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | let greeting_file = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/main.rs:762:9 [INFO] [stdout] | [INFO] [stdout] 762 | let greeting_file = File::open("hello.txt").unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> src/main.rs:764:9 [INFO] [stdout] | [INFO] [stdout] 764 | let greeting_file = [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `integer` [INFO] [stdout] --> src/main.rs:834:9 [INFO] [stdout] | [INFO] [stdout] 834 | 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/main.rs:835:9 [INFO] [stdout] | [INFO] [stdout] 835 | 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: `item` [INFO] [stdout] --> src/main.rs:815:13 [INFO] [stdout] | [INFO] [stdout] 815 | for item in list { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:814:13 [INFO] [stdout] | [INFO] [stdout] 814 | let mut largest = &list[0]; [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `item` [INFO] [stdout] --> src/main.rs:920:41 [INFO] [stdout] | [INFO] [stdout] 920 | pub fn notify(item: &T) {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_item` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/main.rs:923:28 [INFO] [stdout] | [INFO] [stdout] 923 | fn some_function(t: &T, u: &U) [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/main.rs:923:35 [INFO] [stdout] | [INFO] [stdout] 923 | fn some_function(t: &T, u: &U) [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> src/main.rs:1002:9 [INFO] [stdout] | [INFO] [stdout] 1002 | let i = ImportantExcerpt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:1024:9 [INFO] [stdout] | [INFO] [stdout] 1024 | let s: &'static str = "I have a static lifetime"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:989:32 [INFO] [stdout] | [INFO] [stdout] 989 | fn longest<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/main.rs:1112:9 [INFO] [stdout] | [INFO] [stdout] 1112 | let s = example_closure("Hello".to_string()); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list` [INFO] [stdout] --> src/main.rs:1268:9 [INFO] [stdout] | [INFO] [stdout] 1268 | let list = Cons(1, Box::new(Cons(2, Box::new(Cons(3, Box::new(Nil)))))); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_list` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/main.rs:1321:9 [INFO] [stdout] | [INFO] [stdout] 1321 | let c = CustomSmartPointer { [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] --> src/main.rs:1324:9 [INFO] [stdout] | [INFO] [stdout] 1324 | let d = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_d` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/main.rs:1349:9 [INFO] [stdout] | [INFO] [stdout] 1349 | let b = Cons(3, Rc::clone(&a)); // 不会拷贝, 只会操作引用计数从 1 -> 2 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/main.rs:1352:13 [INFO] [stdout] | [INFO] [stdout] 1352 | let c = Cons(4, Rc::clone(&a)); // 不会拷贝, 只会操作引用计数从 2 -> 3 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `post` [INFO] [stdout] --> src/main.rs:1785:31 [INFO] [stdout] | [INFO] [stdout] 1785 | fn content<'a>(&self, post: &'a Post) -> &'a str { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_post` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:1871:9 [INFO] [stdout] | [INFO] [stdout] 1871 | let x = 5; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:1873:10 [INFO] [stdout] | [INFO] [stdout] 1873 | let (x, y, z) = (1, 2, 3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:1873:13 [INFO] [stdout] | [INFO] [stdout] 1873 | let (x, y, z) = (1, 2, 3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/main.rs:1873:16 [INFO] [stdout] | [INFO] [stdout] 1873 | let (x, y, z) = (1, 2, 3); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/main.rs:1876:12 [INFO] [stdout] | [INFO] [stdout] 1876 | fn foo(x: i32) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/main.rs:2021:9 [INFO] [stdout] | [INFO] [stdout] 2021 | let y = 10; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/main.rs:2167:9 [INFO] [stdout] | [INFO] [stdout] 2167 | let f: Thunk = Box::new(|| println!("hi")); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/main.rs:2168:24 [INFO] [stdout] | [INFO] [stdout] 2168 | fn takes_long_type(f: Thunk) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/main.rs:2211:9 [INFO] [stdout] | [INFO] [stdout] 2211 | let v: Vec = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `guess_number` is never used [INFO] [stdout] --> src/main.rs:64:4 [INFO] [stdout] | [INFO] [stdout] 64 | fn guess_number() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `variables_and_mutability` is never used [INFO] [stdout] --> src/main.rs:95:4 [INFO] [stdout] | [INFO] [stdout] 95 | fn variables_and_mutability() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `data_types` is never used [INFO] [stdout] --> src/main.rs:122:4 [INFO] [stdout] | [INFO] [stdout] 122 | fn data_types() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `another_function` is never used [INFO] [stdout] --> src/main.rs:166:4 [INFO] [stdout] | [INFO] [stdout] 166 | fn another_function(x: i32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `control_flow` is never used [INFO] [stdout] --> src/main.rs:192:4 [INFO] [stdout] | [INFO] [stdout] 192 | fn control_flow() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `ownership` is never used [INFO] [stdout] --> src/main.rs:272:4 [INFO] [stdout] | [INFO] [stdout] 272 | fn ownership() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `references_and_borrowing` is never used [INFO] [stdout] --> src/main.rs:312:4 [INFO] [stdout] | [INFO] [stdout] 312 | fn references_and_borrowing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `slices` is never used [INFO] [stdout] --> src/main.rs:343:4 [INFO] [stdout] | [INFO] [stdout] 343 | fn slices() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `defining_structs` is never used [INFO] [stdout] --> src/main.rs:359:4 [INFO] [stdout] | [INFO] [stdout] 359 | fn defining_structs() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `example_structs` is never used [INFO] [stdout] --> src/main.rs:397:4 [INFO] [stdout] | [INFO] [stdout] 397 | fn example_structs() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `method_syntax` is never used [INFO] [stdout] --> src/main.rs:417:4 [INFO] [stdout] | [INFO] [stdout] 417 | fn method_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `area` is never used [INFO] [stdout] --> src/main.rs:424:12 [INFO] [stdout] | [INFO] [stdout] 423 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 424 | fn area(self: &Self) -> u32 { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `can_hold` and `square` are never used [INFO] [stdout] --> src/main.rs:429:12 [INFO] [stdout] | [INFO] [stdout] 428 | impl Rectangle { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 429 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 432 | fn square(size: u32) -> Self { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `defining_an_enum` is never used [INFO] [stdout] --> src/main.rs:458:4 [INFO] [stdout] | [INFO] [stdout] 458 | fn defining_an_enum() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `call` is never used [INFO] [stdout] --> src/main.rs:490:12 [INFO] [stdout] | [INFO] [stdout] 489 | impl Message { [INFO] [stdout] | ------------ method in this implementation [INFO] [stdout] 490 | fn call(&self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `match_flow` is never used [INFO] [stdout] --> src/main.rs:505:4 [INFO] [stdout] | [INFO] [stdout] 505 | fn match_flow() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `if_let` is never used [INFO] [stdout] --> src/main.rs:564:4 [INFO] [stdout] | [INFO] [stdout] 564 | fn if_let() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `defining_modules_to_control_scope_and_privacy` is never used [INFO] [stdout] --> src/main.rs:594:4 [INFO] [stdout] | [INFO] [stdout] 594 | fn defining_modules_to_control_scope_and_privacy() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `paths_for_referring_to_an_item_in_the_module_tree` is never used [INFO] [stdout] --> src/main.rs:599:4 [INFO] [stdout] | [INFO] [stdout] 599 | fn paths_for_referring_to_an_item_in_the_module_tree() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `vectors` is never used [INFO] [stdout] --> src/main.rs:611:4 [INFO] [stdout] | [INFO] [stdout] 611 | fn vectors() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `strings` is never used [INFO] [stdout] --> src/main.rs:645:4 [INFO] [stdout] | [INFO] [stdout] 645 | fn strings() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hash_maps` is never used [INFO] [stdout] --> src/main.rs:687:4 [INFO] [stdout] | [INFO] [stdout] 687 | fn hash_maps() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unrecoverable_errors_with_panic` is never used [INFO] [stdout] --> src/main.rs:728:4 [INFO] [stdout] | [INFO] [stdout] 728 | fn unrecoverable_errors_with_panic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `recoverable_errors_with_result` is never used [INFO] [stdout] --> src/main.rs:734:4 [INFO] [stdout] | [INFO] [stdout] 734 | fn recoverable_errors_with_result() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `to_panic_or_not_to_panic` is never used [INFO] [stdout] --> src/main.rs:803:4 [INFO] [stdout] | [INFO] [stdout] 803 | fn to_panic_or_not_to_panic() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `syntax` is never used [INFO] [stdout] --> src/main.rs:811:4 [INFO] [stdout] | [INFO] [stdout] 811 | fn syntax() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `x` is never used [INFO] [stdout] --> src/main.rs:848:12 [INFO] [stdout] | [INFO] [stdout] 847 | impl Point { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] 848 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `distance_from_origin` is never used [INFO] [stdout] --> src/main.rs:857:12 [INFO] [stdout] | [INFO] [stdout] 856 | impl Point { [INFO] [stdout] | --------------- method in this implementation [INFO] [stdout] 857 | fn distance_from_origin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `traits` is never used [INFO] [stdout] --> src/main.rs:865:4 [INFO] [stdout] | [INFO] [stdout] 865 | fn traits() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `summarize` is never used [INFO] [stdout] --> src/main.rs:869:12 [INFO] [stdout] | [INFO] [stdout] 868 | pub trait Summary { [INFO] [stdout] | ------- method in this trait [INFO] [stdout] 869 | fn summarize(&self) -> String; // 一行一个方法签名且都以分号结尾 [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `content` is never read [INFO] [stdout] --> src/main.rs:877:13 [INFO] [stdout] | [INFO] [stdout] 873 | pub struct NewsArticle { [INFO] [stdout] | ----------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 877 | pub content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `reply` and `retweet` are never read [INFO] [stdout] --> src/main.rs:887:13 [INFO] [stdout] | [INFO] [stdout] 884 | pub struct Tweet { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 887 | pub reply: bool, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 888 | pub retweet: bool, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:944:12 [INFO] [stdout] | [INFO] [stdout] 943 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 944 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/main.rs:949:12 [INFO] [stdout] | [INFO] [stdout] 948 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 949 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `lifetime_syntax` is never used [INFO] [stdout] --> src/main.rs:960:4 [INFO] [stdout] | [INFO] [stdout] 960 | fn lifetime_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `announce_and_return_part` is never used [INFO] [stdout] --> src/main.rs:1017:12 [INFO] [stdout] | [INFO] [stdout] 1016 | impl<'a> ImportantExcerpt<'a> { [INFO] [stdout] | ----------------------------- method in this implementation [INFO] [stdout] 1017 | fn announce_and_return_part(&self, announcement: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `wirting_tests` is never used [INFO] [stdout] --> src/main.rs:1041:4 [INFO] [stdout] | [INFO] [stdout] 1041 | fn wirting_tests() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `running_tests` is never used [INFO] [stdout] --> src/main.rs:1056:4 [INFO] [stdout] | [INFO] [stdout] 1056 | fn running_tests() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `closures` is never used [INFO] [stdout] --> src/main.rs:1059:4 [INFO] [stdout] | [INFO] [stdout] 1059 | fn closures() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `giveaway` and `most_stocked` are never used [INFO] [stdout] --> src/main.rs:1072:12 [INFO] [stdout] | [INFO] [stdout] 1071 | impl Inventory { [INFO] [stdout] | -------------- methods in this implementation [INFO] [stdout] 1072 | fn giveaway(&self, user_perference: Option) -> ShirtColor { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1077 | fn most_stocked(&self) -> ShirtColor { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `iterators` is never used [INFO] [stdout] --> src/main.rs:1145:4 [INFO] [stdout] | [INFO] [stdout] 1145 | fn iterators() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `performance` is never used [INFO] [stdout] --> src/main.rs:1231:4 [INFO] [stdout] | [INFO] [stdout] 1231 | fn performance() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `release_profiles` is never used [INFO] [stdout] --> src/main.rs:1236:4 [INFO] [stdout] | [INFO] [stdout] 1236 | fn release_profiles() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `cargo_workspace` is never used [INFO] [stdout] --> src/main.rs:1241:4 [INFO] [stdout] | [INFO] [stdout] 1241 | fn cargo_workspace() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `re_box` is never used [INFO] [stdout] --> src/main.rs:1250:4 [INFO] [stdout] | [INFO] [stdout] 1250 | fn re_box() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `deref` is never used [INFO] [stdout] --> src/main.rs:1273:4 [INFO] [stdout] | [INFO] [stdout] 1273 | fn deref() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/main.rs:1293:12 [INFO] [stdout] | [INFO] [stdout] 1292 | impl MyBox { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 1293 | fn new(x: T) -> MyBox { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `re_drop` is never used [INFO] [stdout] --> src/main.rs:1312:4 [INFO] [stdout] | [INFO] [stdout] 1312 | fn re_drop() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `rc` is never used [INFO] [stdout] --> src/main.rs:1340:4 [INFO] [stdout] | [INFO] [stdout] 1340 | fn rc() { [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `interior_mutability` is never used [INFO] [stdout] --> src/main.rs:1358:4 [INFO] [stdout] | [INFO] [stdout] 1358 | fn interior_mutability() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reference_cycles` is never used [INFO] [stdout] --> src/main.rs:1372:4 [INFO] [stdout] | [INFO] [stdout] 1372 | fn reference_cycles() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `tail` is never used [INFO] [stdout] --> src/main.rs:1383:12 [INFO] [stdout] | [INFO] [stdout] 1382 | impl List { [INFO] [stdout] | --------- method in this implementation [INFO] [stdout] 1383 | fn tail(&self) -> Option<&RefCell>> { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `threads` is never used [INFO] [stdout] --> src/main.rs:1481:4 [INFO] [stdout] | [INFO] [stdout] 1481 | fn threads() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `message_passing` is never used [INFO] [stdout] --> src/main.rs:1523:4 [INFO] [stdout] | [INFO] [stdout] 1523 | fn message_passing() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `shared_state` is never used [INFO] [stdout] --> src/main.rs:1600:4 [INFO] [stdout] | [INFO] [stdout] 1600 | fn shared_state() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `extensible_concurrency_sync_and_send` is never used [INFO] [stdout] --> src/main.rs:1633:4 [INFO] [stdout] | [INFO] [stdout] 1633 | fn extensible_concurrency_sync_and_send() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `what_is_oo` is never used [INFO] [stdout] --> src/main.rs:1647:4 [INFO] [stdout] | [INFO] [stdout] 1647 | fn what_is_oo() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `add`, `remove`, `average`, and `update_average` are never used [INFO] [stdout] --> src/main.rs:1659:16 [INFO] [stdout] | [INFO] [stdout] 1658 | impl AverageCollection { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] 1659 | pub fn add(&mut self, value: i32) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 1663 | pub fn remove(&mut self) -> Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1673 | pub fn average(&self) -> f64 { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1676 | fn update_average(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `trait_objects` is never used [INFO] [stdout] --> src/main.rs:1694:4 [INFO] [stdout] | [INFO] [stdout] 1694 | fn trait_objects() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `draw` is never used [INFO] [stdout] --> src/main.rs:1697:12 [INFO] [stdout] | [INFO] [stdout] 1696 | pub trait Draw { [INFO] [stdout] | ---- method in this trait [INFO] [stdout] 1697 | fn draw(&self) {} [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `run` is never used [INFO] [stdout] --> src/main.rs:1704:16 [INFO] [stdout] | [INFO] [stdout] 1703 | impl Screen { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] 1704 | pub fn run(&self) { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `width`, `height`, and `label` are never read [INFO] [stdout] --> src/main.rs:1712:13 [INFO] [stdout] | [INFO] [stdout] 1711 | pub struct Button { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 1712 | pub width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 1713 | pub height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 1714 | pub label: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `width`, `height`, and `options` are never read [INFO] [stdout] --> src/main.rs:1722:9 [INFO] [stdout] | [INFO] [stdout] 1721 | pub struct SelectBox { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] 1722 | width: u32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 1723 | height: u32, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 1724 | options: Vec, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `oo_design_patterns` is never used [INFO] [stdout] --> src/main.rs:1751:4 [INFO] [stdout] | [INFO] [stdout] 1751 | fn oo_design_patterns() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `add_text`, `content`, `request_review`, and `approve` are never used [INFO] [stdout] --> src/main.rs:1759:16 [INFO] [stdout] | [INFO] [stdout] 1758 | impl Post { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 1759 | pub fn new() -> Post { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 1765 | pub fn add_text(&mut self, text: &str) { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1768 | pub fn content(&self) -> &str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1771 | pub fn request_review(&mut self) { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 1776 | pub fn approve(&mut self) { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `all_the_places_for_patterns` is never used [INFO] [stdout] --> src/main.rs:1830:4 [INFO] [stdout] | [INFO] [stdout] 1830 | fn all_the_places_for_patterns() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `refutability` is never used [INFO] [stdout] --> src/main.rs:1885:4 [INFO] [stdout] | [INFO] [stdout] 1885 | fn refutability() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pattern_syntax` is never used [INFO] [stdout] --> src/main.rs:1894:4 [INFO] [stdout] | [INFO] [stdout] 1894 | fn pattern_syntax() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `unsafe_rust` is never used [INFO] [stdout] --> src/main.rs:2065:4 [INFO] [stdout] | [INFO] [stdout] 2065 | fn unsafe_rust() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `advanced_traits` is never used [INFO] [stdout] --> src/main.rs:2156:4 [INFO] [stdout] | [INFO] [stdout] 2156 | fn advanced_traits() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `advanced_types` is never used [INFO] [stdout] --> src/main.rs:2159:4 [INFO] [stdout] | [INFO] [stdout] 2159 | fn advanced_types() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `returns_closure` is never used [INFO] [stdout] --> src/main.rs:2191:8 [INFO] [stdout] | [INFO] [stdout] 2191 | fn returns_closure() -> Box i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `macros` is never used [INFO] [stdout] --> src/main.rs:2197:4 [INFO] [stdout] | [INFO] [stdout] 2197 | fn macros() { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `abs` is never used [INFO] [stdout] --> src/main.rs:2132:12 [INFO] [stdout] | [INFO] [stdout] 2132 | fn abs(input: i32) -> i32; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `Alaska` should have a snake case name [INFO] [stdout] --> src/main.rs:533:9 [INFO] [stdout] | [INFO] [stdout] 533 | let Alaska = Coin::Quarter(UsState::Alaska); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `alaska` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static is discouraged [INFO] [stdout] --> src/main.rs:2148:38 [INFO] [stdout] | [INFO] [stdout] 2148 | unsafe { println!("COUNTER: {}", COUNTER) } [INFO] [stdout] | ^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.41s [INFO] running `Command { std: "docker" "inspect" "e6fa135eeb1fe0eb4a17072ada062f4d58b3f41473cce5f96a484ce8313c0ba4", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e6fa135eeb1fe0eb4a17072ada062f4d58b3f41473cce5f96a484ce8313c0ba4", kill_on_drop: false }` [INFO] [stdout] e6fa135eeb1fe0eb4a17072ada062f4d58b3f41473cce5f96a484ce8313c0ba4