[INFO] cloning repository https://github.com/tokiwadai/rust_prog_lang [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/tokiwadai/rust_prog_lang" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftokiwadai%2Frust_prog_lang", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftokiwadai%2Frust_prog_lang'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 806e2a31240750bef6af899481c731e26185731a [INFO] checking tokiwadai/rust_prog_lang against try#d990716b6a1fdde1300748828a9c9e79dfd0b898 for pr-74846 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftokiwadai%2Frust_prog_lang" "/workspace/builds/worker-0/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/tokiwadai/rust_prog_lang on toolchain d990716b6a1fdde1300748828a9c9e79dfd0b898 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+d990716b6a1fdde1300748828a9c9e79dfd0b898" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/tokiwadai/rust_prog_lang [INFO] finished tweaking git repo https://github.com/tokiwadai/rust_prog_lang [INFO] tweaked toml for git repo https://github.com/tokiwadai/rust_prog_lang written to /workspace/builds/worker-0/source/Cargo.toml [INFO] crate git repo https://github.com/tokiwadai/rust_prog_lang already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+d990716b6a1fdde1300748828a9c9e79dfd0b898" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/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" "rustops/crates-build-env@sha256:a636fd89d022f18117e1dc8fb37a0a009933cdbbe082814857f0e2024962d47c" "/opt/rustwide/cargo-home/bin/cargo" "+d990716b6a1fdde1300748828a9c9e79dfd0b898" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 320201aa07f32d1a831290b45428c8258888cf98a6acdbf78b887e1bb4b08936 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "320201aa07f32d1a831290b45428c8258888cf98a6acdbf78b887e1bb4b08936", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "320201aa07f32d1a831290b45428c8258888cf98a6acdbf78b887e1bb4b08936", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "320201aa07f32d1a831290b45428c8258888cf98a6acdbf78b887e1bb4b08936", kill_on_drop: false }` [INFO] [stdout] 320201aa07f32d1a831290b45428c8258888cf98a6acdbf78b887e1bb4b08936 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "rustops/crates-build-env@sha256:a636fd89d022f18117e1dc8fb37a0a009933cdbbe082814857f0e2024962d47c" "/opt/rustwide/cargo-home/bin/cargo" "+d990716b6a1fdde1300748828a9c9e79dfd0b898" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d509a95eea6b094b37f39113e39ac80b6a6d19b7e531f985251f3547f453a8fd [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "d509a95eea6b094b37f39113e39ac80b6a6d19b7e531f985251f3547f453a8fd", kill_on_drop: false }` [INFO] [stderr] Checking rust_prog_lang v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `order1` [INFO] [stdout] --> src/lib.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | 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 variable: `order2` [INFO] [stdout] --> src/lib.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let order2 = back_of_house::Appetizer::Salad; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_order2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `seat_at_table` [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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `take_order` [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 is never used: `serve_order` [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 is never used: `take_payment` [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: function is never used: `serve_order` [INFO] [stdout] --> src/lib.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn serve_order() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `seasonal_fruit` [INFO] [stdout] --> src/lib.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | seasonal_fruit: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `cook_order` [INFO] [stdout] --> src/lib.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `fix_incorrect_order` [INFO] [stdout] --> src/lib.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 10 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `order1` [INFO] [stdout] --> src/lib.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | 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 variable: `order2` [INFO] [stdout] --> src/lib.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let order2 = back_of_house::Appetizer::Salad; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_order2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `seat_at_table` [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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `take_order` [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 is never used: `serve_order` [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 is never used: `take_payment` [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: function is never used: `serve_order` [INFO] [stdout] --> src/lib.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn serve_order() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `seasonal_fruit` [INFO] [stdout] --> src/lib.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | seasonal_fruit: String, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `cook_order` [INFO] [stdout] --> src/lib.rs:33:8 [INFO] [stdout] | [INFO] [stdout] 33 | fn cook_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `fix_incorrect_order` [INFO] [stdout] --> src/lib.rs:34:8 [INFO] [stdout] | [INFO] [stdout] 34 | fn fix_incorrect_order() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 10 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | 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/bin/chap8/4_string_samples.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | 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/bin/chap8/4_string_samples.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let s = String::from("initial contents"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let hello = String::from("السلام علیكم"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let hello = String::from("Dobrý den"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let hello = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let hello = String::from("Здравствуйте"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let hello = String::from("Hola"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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 doc comment [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | / /** This won't compile, pp. 220 [INFO] [stdout] 65 | | let result; [INFO] [stdout] 66 | | { [INFO] [stdout] 67 | | let string2 = String::from("xyz"); [INFO] [stdout] ... | [INFO] [stdout] 70 | | println!("The longest string is {}", result); [INFO] [stdout] 71 | | */ [INFO] [stdout] | |______^ [INFO] [stdout] 72 | [INFO] [stdout] 73 | let string1 = String::from("abcd"); [INFO] [stdout] | ----------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:27:30 [INFO] [stdout] | [INFO] [stdout] 27 | fn longest_x<'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] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string1` [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let string1 = String::from("long string is long"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_string1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 10 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `longest_x` [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn longest_x<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/bin/chap11/1_test_samples.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn greeting2(name: &str) -> String { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance_from_origin` [INFO] [stdout] --> src/bin/chap10/1_generic_samples.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | fn distance_from_origin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/chap9/2_result_recoverable_samples.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `value` [INFO] [stdout] --> src/bin/chap11/1_test_samples.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | value: i32, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/bin/chap4/4_reference_borrowing.rs:28:17 [INFO] [stdout] | [INFO] [stdout] 28 | fn change_immut(some_string: &String) { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `newB` should have a snake case name [INFO] [stdout] --> src/bin/chap11/1_test_samples.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn newB(value: i32) -> Guess { [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `new_b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/bin/chap10/4_generic_trait_samples.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/bin/chap10/2_trait_samples.rs:57:24 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/bin/chap10/2_trait_samples.rs:57:31 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list` [INFO] [stdout] --> src/bin/chap10/3_generic_trait_samples.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | fn largest_not_work(list: &[T]) -> T { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_list` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `some_function` [INFO] [stdout] --> src/bin/chap10/2_trait_samples.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `largest_not_work` [INFO] [stdout] --> src/bin/chap10/3_generic_trait_samples.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn largest_not_work(list: &[T]) -> T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `s2` is never read [INFO] [stdout] --> src/bin/chap4/1_variable_scope.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let mut s2 = "hello world!"; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/chap4/7_string_slices.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let word = first_word(&s); // word will get the value 5 [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / /** The Cons variants own the data they hold, so when we create the b list, [INFO] [stdout] 22 | | a is moved into b and b owns a. Then, when we try to use a again when creating c, [INFO] [stdout] 23 | | we’re not allowed to because a has been moved, pp. 366 [INFO] [stdout] 24 | | */ [INFO] [stdout] | |______^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `List_Box` should have an upper camel case name [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:2:6 [INFO] [stdout] | [INFO] [stdout] 2 | enum List_Box { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `ListBox` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | /** Box allows immutable or mutable borrows checked at compile time, pp. 370 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 17 | / let a = List_Box::Cons(5, [INFO] [stdout] 18 | | Box::new(List_Box::Cons(10, [INFO] [stdout] 19 | | Box::new(List_Box::Nil)))); [INFO] [stdout] | |______________________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / /** pp 370 [INFO] [stdout] 30 | | - Rc ENABLES MULTIPLE OWNERS of the same data, [INFO] [stdout] 31 | | while Box and RefCell have single owners [INFO] [stdout] 32 | | - Rc allows only IMMUTABLE borrows checked at compile time [INFO] [stdout] 33 | | */ [INFO] [stdout] | |__________^ [INFO] [stdout] 34 | / let a = Rc::new(List::Cons(5, [INFO] [stdout] 35 | | Rc::new(List::Cons(10, [INFO] [stdout] 36 | | Rc::new(List::Nil))))); [INFO] [stdout] | |_________________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / /** The implementation of Rc::clone doesn’t make a deep copy of all the data [INFO] [stdout] 38 | | like most types’ implementations of clone do. [INFO] [stdout] 39 | | The call to Rc::clone only increments the reference count, which doesn’t take much time. [INFO] [stdout] 40 | | Deep copies of data can take a lot of time, pp. 367 */ [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] 41 | let b = List::Cons(3, Rc::clone(&a)); [INFO] [stdout] | ------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | /** Printing the reference count, pp. 368 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 49 | / let a = Rc::new(List::Cons(5, [INFO] [stdout] 50 | | Rc::new(List::Cons(10, [INFO] [stdout] 51 | | Rc::new(List::Nil))))); [INFO] [stdout] | |_________________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let b = List::Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | let c = List::Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/bin/chap10/4_generic_trait_samples.rs:10:8 [INFO] [stdout] | [INFO] [stdout] 10 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `shoes_in_my_size` [INFO] [stdout] --> src/bin/chap13/5_closure_iter_samples.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | fn shoes_in_my_size(shoes: Vec, shoe_size: u32) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/4_refcell_samples.rs:76:13 [INFO] [stdout] | [INFO] [stdout] 76 | / /** We can’t modify the to keep track of the messages, [INFO] [stdout] 77 | | because the send method takes an immutable reference to self, pp. 374. */ [INFO] [stdout] 78 | | // self.sent_messages.push(String::from(message)); [INFO] [stdout] 79 | | [INFO] [stdout] ... | [INFO] [stdout] 82 | | Then we can call push on the mutable reference to the vector [INFO] [stdout] 83 | | to keep track of the messages sent during the test, pp. 375 */ [INFO] [stdout] | |______________________________________________________________________________^ [INFO] [stdout] 84 | let mut one_borrow: RefMut> = self.sent_messages.borrow_mut(); [INFO] [stdout] | -------------------------------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/chap8/2_vec_immut_ref.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let mut v = vec![1, 2, 3, 4, 5]; [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `read_username_from_file` [INFO] [stdout] --> src/bin/chap9/4_propagating_error.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `read_username_from_file2` [INFO] [stdout] --> src/bin/chap9/4_propagating_error.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn read_username_from_file2() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `read_username_from_file3` [INFO] [stdout] --> src/bin/chap9/4_propagating_error.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn read_username_from_file3() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap4/5_mut_immut_references.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / /** [INFO] [stdout] 7 | | * you can have only one mutable reference [INFO] [stdout] 8 | | * to a particular piece of data in a particular scope [INFO] [stdout] 9 | | * [INFO] [stdout] 10 | | * Code below will fail [INFO] [stdout] 11 | | */ [INFO] [stdout] | |______^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/bin/chap15/2_drop_samples.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let c = CustomSmartPointer { [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: `d` [INFO] [stdout] --> src/bin/chap15/2_drop_samples.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | 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: `c` [INFO] [stdout] --> src/bin/chap15/2_drop_samples.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | 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: `r1` [INFO] [stdout] --> src/bin/chap4/5_mut_immut_references.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/chap4/5_mut_immut_references.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let mut s = String::from("hello"); [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: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap4/5_mut_immut_references.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | / /** [INFO] [stdout] 7 | | * you can have only one mutable reference [INFO] [stdout] 8 | | * to a particular piece of data in a particular scope [INFO] [stdout] 9 | | * [INFO] [stdout] 10 | | * Code below will fail [INFO] [stdout] 11 | | */ [INFO] [stdout] | |______^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / /** Compile error. [INFO] [stdout] 61 | | The error shows this type “has infnite size.” [INFO] [stdout] 62 | | The reason is that we’ve defined List with a variant that is recursive: [INFO] [stdout] 63 | | it holds another value of itself directly. [INFO] [stdout] 64 | | As a result, Rust can’t figure out how much space it needs to store a List value. */ [INFO] [stdout] | |____________________________________________________________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 68 | / let list: ListBox = Cons(1, [INFO] [stdout] 69 | | Box::new(Cons(2, [INFO] [stdout] 70 | | Box::new(Cons(3, [INFO] [stdout] 71 | | Box::new(Nil)))))); [INFO] [stdout] | |___________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / /** Following the Pointer to the Value with the Dereference Operator, pp. 354 [INFO] [stdout] 76 | | The variable x holds an i32 value, 5. [INFO] [stdout] 77 | | We set y equal to a reference to x. We can assert that x is equal to 5. [INFO] [stdout] 78 | | However, if we want to make an assertion about the value in y, [INFO] [stdout] 79 | | we have to use *y to follow the reference to the value it’s pointing to (hence dereference). [INFO] [stdout] 80 | | Once we dereference y, we have access to the integer value y is pointing to [INFO] [stdout] 81 | | that we can compare with 5, pp. 355 */ [INFO] [stdout] | |______________________________________________^ [INFO] [stdout] 82 | let x = 5; [INFO] [stdout] | ---------- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / /** [INFO] [stdout] 105 | | * Implicit Deref Coercions with Functions and Methods, pp. 359 */ [INFO] [stdout] | |______________________________________________________________________^ [INFO] [stdout] 106 | // call the hello function with a string slice as an argument, pp. 359 [INFO] [stdout] 107 | hello("Rust1"); [INFO] [stdout] | -------------- rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | / /** If Rust didn’t implement deref coercion, [INFO] [stdout] 116 | | we would have to write the code like below instead, [INFO] [stdout] 117 | | to call hello with a value of type &MyBox, pp. 359 [INFO] [stdout] 118 | | */ [INFO] [stdout] | |______^ [INFO] [stdout] 119 | let m = MyBox::new(String::from("Rust3")); [INFO] [stdout] | ------------------------------------------ rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / /** The (*m) dereferences the MyBox into a String . [INFO] [stdout] 121 | | Then the & and take a string slice of the String [INFO] [stdout] 122 | | that is equal to the whole string to match the signature of hello, pp. 360 */ [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] 123 | hello(&(*m)[..]); [INFO] [stdout] | ---------------- rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/chap9/3_result_matching_samples.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let f = File::open("hello2.txt") [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> src/bin/chap4/5_mut_immut_references.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/chap4/5_mut_immut_references.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let mut s = String::from("hello"); [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: `f` [INFO] [stdout] --> src/bin/chap9/2_result_recoverable_samples.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `read_username_from_file` [INFO] [stdout] --> src/bin/chap9/4_propagating_error.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `read_username_from_file2` [INFO] [stdout] --> src/bin/chap9/4_propagating_error.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | fn read_username_from_file2() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `read_username_from_file3` [INFO] [stdout] --> src/bin/chap9/4_propagating_error.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | fn read_username_from_file3() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:64:5 [INFO] [stdout] | [INFO] [stdout] 64 | / /** This won't compile, pp. 220 [INFO] [stdout] 65 | | let result; [INFO] [stdout] 66 | | { [INFO] [stdout] 67 | | let string2 = String::from("xyz"); [INFO] [stdout] ... | [INFO] [stdout] 70 | | println!("The longest string is {}", result); [INFO] [stdout] 71 | | */ [INFO] [stdout] | |______^ [INFO] [stdout] 72 | [INFO] [stdout] 73 | let string1 = String::from("abcd"); [INFO] [stdout] | ----------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v1` [INFO] [stdout] --> src/bin/chap13/2_closure_samples.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let v1 = c.value(1); let v2 = c.value(2); [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:27:30 [INFO] [stdout] | [INFO] [stdout] 27 | fn longest_x<'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] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string1` [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let string1 = String::from("long string is long"); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_string1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `longest_x` [INFO] [stdout] --> src/bin/chap10/5_lifetime_generic_samples.rs:27:4 [INFO] [stdout] | [INFO] [stdout] 27 | fn longest_x<'a>(x: &'a str, y: &str) -> &'a str { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/bin/chap15/2_drop_samples.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let c = CustomSmartPointer { [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: `d` [INFO] [stdout] --> src/bin/chap15/2_drop_samples.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | 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: `c` [INFO] [stdout] --> src/bin/chap15/2_drop_samples.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let c = CustomSmartPointer { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `s2` is never read [INFO] [stdout] --> src/bin/chap4/1_variable_scope.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let mut s2 = "hello world!"; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `distance_from_origin` [INFO] [stdout] --> src/bin/chap10/1_generic_samples.rs:12:8 [INFO] [stdout] | [INFO] [stdout] 12 | fn distance_from_origin(&self) -> f32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/bin/chap10/2_trait_samples.rs:57:24 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `u` [INFO] [stdout] --> src/bin/chap10/2_trait_samples.rs:57:31 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_u` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `some_function` [INFO] [stdout] --> src/bin/chap10/2_trait_samples.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function(t: &T, u: &U) -> i32 [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/bin/chap4/4_reference_borrowing.rs:28:17 [INFO] [stdout] | [INFO] [stdout] 28 | fn change_immut(some_string: &String) { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list` [INFO] [stdout] --> src/bin/chap10/3_generic_trait_samples.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | fn largest_not_work(list: &[T]) -> T { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_list` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `largest_not_work` [INFO] [stdout] --> src/bin/chap10/3_generic_trait_samples.rs:21:4 [INFO] [stdout] | [INFO] [stdout] 21 | fn largest_not_work(list: &[T]) -> T { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / /** The Cons variants own the data they hold, so when we create the b list, [INFO] [stdout] 22 | | a is moved into b and b owns a. Then, when we try to use a again when creating c, [INFO] [stdout] 23 | | we’re not allowed to because a has been moved, pp. 366 [INFO] [stdout] 24 | | */ [INFO] [stdout] | |______^ rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: to document an item produced by a macro, the macro must produce the documentation as part of its expansion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type `List_Box` should have an upper camel case name [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:2:6 [INFO] [stdout] | [INFO] [stdout] 2 | enum List_Box { [INFO] [stdout] | ^^^^^^^^ help: convert the identifier to upper camel case: `ListBox` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_camel_case_types)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | /** Box allows immutable or mutable borrows checked at compile time, pp. 370 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 17 | / let a = List_Box::Cons(5, [INFO] [stdout] 18 | | Box::new(List_Box::Cons(10, [INFO] [stdout] 19 | | Box::new(List_Box::Nil)))); [INFO] [stdout] | |______________________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | / /** pp 370 [INFO] [stdout] 30 | | - Rc ENABLES MULTIPLE OWNERS of the same data, [INFO] [stdout] 31 | | while Box and RefCell have single owners [INFO] [stdout] 32 | | - Rc allows only IMMUTABLE borrows checked at compile time [INFO] [stdout] 33 | | */ [INFO] [stdout] | |__________^ [INFO] [stdout] 34 | / let a = Rc::new(List::Cons(5, [INFO] [stdout] 35 | | Rc::new(List::Cons(10, [INFO] [stdout] 36 | | Rc::new(List::Nil))))); [INFO] [stdout] | |_________________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / /** The implementation of Rc::clone doesn’t make a deep copy of all the data [INFO] [stdout] 38 | | like most types’ implementations of clone do. [INFO] [stdout] 39 | | The call to Rc::clone only increments the reference count, which doesn’t take much time. [INFO] [stdout] 40 | | Deep copies of data can take a lot of time, pp. 367 */ [INFO] [stdout] | |______________________________________________________________^ [INFO] [stdout] 41 | let b = List::Cons(3, Rc::clone(&a)); [INFO] [stdout] | ------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | /** Printing the reference count, pp. 368 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 49 | / let a = Rc::new(List::Cons(5, [INFO] [stdout] 50 | | Rc::new(List::Cons(10, [INFO] [stdout] 51 | | Rc::new(List::Nil))))); [INFO] [stdout] | |_________________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function is never used: `new` [INFO] [stdout] --> src/bin/chap13/6_create_own_iter_samples.rs:6:8 [INFO] [stdout] | [INFO] [stdout] 6 | fn new() -> Counter { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let b = List::Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/bin/chap15/3_rc_samples.rs:56:13 [INFO] [stdout] | [INFO] [stdout] 56 | let c = List::Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> src/bin/chap4/7_string_slices.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let word = first_word(&s); // word will get the value 5 [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/bin/chap11/1_test_samples.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn greeting2(name: &str) -> String { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `value` [INFO] [stdout] --> src/bin/chap11/1_test_samples.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | value: i32, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `newB` should have a snake case name [INFO] [stdout] --> src/bin/chap11/1_test_samples.rs:24:12 [INFO] [stdout] | [INFO] [stdout] 24 | pub fn newB(value: i32) -> Guess { [INFO] [stdout] | ^^^^ help: convert the identifier to snake case: `new_b` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `greater_than_100B` should have a snake case name [INFO] [stdout] --> src/bin/chap11/1_test_samples.rs:81:8 [INFO] [stdout] | [INFO] [stdout] 81 | fn greater_than_100B() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `greater_than_100_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/chap9/3_result_matching_samples.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 43 | let f = File::open("hello2.txt") [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/chap8/2_vec_immut_ref.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let mut v = vec![1, 2, 3, 4, 5]; [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: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | 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/bin/chap8/4_string_samples.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | 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/bin/chap8/4_string_samples.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let s = String::from("initial contents"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let hello = String::from("السلام علیكم"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let hello = String::from("Dobrý den"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let hello = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let hello = String::from("Здравствуйте"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let hello = String::from("Hola"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/chap8/4_string_samples.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:60:5 [INFO] [stdout] | [INFO] [stdout] 60 | / /** Compile error. [INFO] [stdout] 61 | | The error shows this type “has infnite size.” [INFO] [stdout] 62 | | The reason is that we’ve defined List with a variant that is recursive: [INFO] [stdout] 63 | | it holds another value of itself directly. [INFO] [stdout] 64 | | As a result, Rust can’t figure out how much space it needs to store a List value. */ [INFO] [stdout] | |____________________________________________________________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 68 | / let list: ListBox = Cons(1, [INFO] [stdout] 69 | | Box::new(Cons(2, [INFO] [stdout] 70 | | Box::new(Cons(3, [INFO] [stdout] 71 | | Box::new(Nil)))))); [INFO] [stdout] | |___________________________________________________________________- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 75 | / /** Following the Pointer to the Value with the Dereference Operator, pp. 354 [INFO] [stdout] 76 | | The variable x holds an i32 value, 5. [INFO] [stdout] 77 | | We set y equal to a reference to x. We can assert that x is equal to 5. [INFO] [stdout] 78 | | However, if we want to make an assertion about the value in y, [INFO] [stdout] 79 | | we have to use *y to follow the reference to the value it’s pointing to (hence dereference). [INFO] [stdout] 80 | | Once we dereference y, we have access to the integer value y is pointing to [INFO] [stdout] 81 | | that we can compare with 5, pp. 355 */ [INFO] [stdout] | |______________________________________________^ [INFO] [stdout] 82 | let x = 5; [INFO] [stdout] | ---------- rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / /** [INFO] [stdout] 105 | | * Implicit Deref Coercions with Functions and Methods, pp. 359 */ [INFO] [stdout] | |______________________________________________________________________^ [INFO] [stdout] 106 | // call the hello function with a string slice as an argument, pp. 359 [INFO] [stdout] 107 | hello("Rust1"); [INFO] [stdout] | -------------- rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | / /** If Rust didn’t implement deref coercion, [INFO] [stdout] 116 | | we would have to write the code like below instead, [INFO] [stdout] 117 | | to call hello with a value of type &MyBox, pp. 359 [INFO] [stdout] 118 | | */ [INFO] [stdout] | |______^ [INFO] [stdout] 119 | let m = MyBox::new(String::from("Rust3")); [INFO] [stdout] | ------------------------------------------ rustdoc does not generate documentation for statements [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/1_box_samples.rs:120:5 [INFO] [stdout] | [INFO] [stdout] 120 | / /** The (*m) dereferences the MyBox into a String . [INFO] [stdout] 121 | | Then the & and take a string slice of the String [INFO] [stdout] 122 | | that is equal to the whole string to match the signature of hello, pp. 360 */ [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] 123 | hello(&(*m)[..]); [INFO] [stdout] | ---------------- rustdoc does not generate documentation for expressions [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 10 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 18.86s [INFO] running `Command { std: "docker" "inspect" "d509a95eea6b094b37f39113e39ac80b6a6d19b7e531f985251f3547f453a8fd", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d509a95eea6b094b37f39113e39ac80b6a6d19b7e531f985251f3547f453a8fd", kill_on_drop: false }` [INFO] [stdout] d509a95eea6b094b37f39113e39ac80b6a6d19b7e531f985251f3547f453a8fd