[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] 34d19f5d2570b49f3aac99664021021050edada3 [INFO] checking tokiwadai/rust_prog_lang against try#a7a572ce3edd6d476191fbfe92c9c1986e009b34 for pr-87190-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ftokiwadai%2Frust_prog_lang" "/workspace/builds/worker-11/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-11/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/tokiwadai/rust_prog_lang on toolchain a7a572ce3edd6d476191fbfe92c9c1986e009b34 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+a7a572ce3edd6d476191fbfe92c9c1986e009b34" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", 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-11/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" "+a7a572ce3edd6d476191fbfe92c9c1986e009b34" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/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:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+a7a572ce3edd6d476191fbfe92c9c1986e009b34" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 64ed08a2db37c1a5ec6fa4922c63ca54a515c7d8b85cdb699307fd648456911e [INFO] running `Command { std: "docker" "start" "-a" "64ed08a2db37c1a5ec6fa4922c63ca54a515c7d8b85cdb699307fd648456911e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "64ed08a2db37c1a5ec6fa4922c63ca54a515c7d8b85cdb699307fd648456911e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "64ed08a2db37c1a5ec6fa4922c63ca54a515c7d8b85cdb699307fd648456911e", kill_on_drop: false }` [INFO] [stdout] 64ed08a2db37c1a5ec6fa4922c63ca54a515c7d8b85cdb699307fd648456911e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/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" "ghcr.io/rust-lang/crates-build-env/linux@sha256:34b6a614d2c27851fe6cbf88fbd1137609cefab8b10d0615aaeb6fd47975d74e" "/opt/rustwide/cargo-home/bin/cargo" "+a7a572ce3edd6d476191fbfe92c9c1986e009b34" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f342f0d6f2143a1d6e4545d92467236d563a11f7054d8f07d151e84037c82b04 [INFO] running `Command { std: "docker" "start" "-a" "f342f0d6f2143a1d6e4545d92467236d563a11f7054d8f07d151e84037c82b04", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] Running `cargo fix --edition` [INFO] [stderr] Checking rust_prog_lang v0.1.0 (/tmp/fixit) [INFO] [stderr] Migrating src/lib.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/lib.rs (2 fixes) [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: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap10/4_generic_trait_samples.rs from 2018 edition to 2021 [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] [stderr] Migrating src/bin/chap9/4_propagating_error.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap8/5_hashmap_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap6/4_enum_sample.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap16/5_channel_thread_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap5/1_struct_sample.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap15/5_rc_refcell_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap15/6_ref_cycle_samples.rs from 2018 edition to 2021 [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: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap10/5_lifetime_generic_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap6/1_enum_sample.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap11/1_test_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap13/4_iterator_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap9/1_panic_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/test.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap13/5_closure_iter_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap13/6_create_own_iter_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap13/2_closure_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap15/7_rc_weak_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap4/2_variable_move.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap16/6_mutex_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap4/4_reference_borrowing.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap16/3_thread_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap4/1_variable_scope.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap13/3_closure_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap4/8_string_literal_slices.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap10/2_trait_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap9/2_result_recoverable_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap16/2_thread_samples.rs from 2018 edition to 2021 [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap10/1_generic_samples.rs from 2018 edition to 2021 [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] [stderr] Migrating src/bin/chap15/4_refcell_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap4/7_string_slices.rs from 2018 edition to 2021 [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / /** The send function takes ownership of its parameter, [INFO] [stdout] 12 | | and when the value is moved, the receiver takes ownership of it. [INFO] [stdout] 13 | | This stops us from accidentally using the value again after sending it; [INFO] [stdout] 14 | | the ownership system checks that everything is okay, pp. 402 */ [INFO] [stdout] | |___________________________________________________________________________^ [INFO] [stdout] 15 | tx.send(val).unwrap(); [INFO] [stdout] | --------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / /** recv , short for receive, which will block the main thread’s execution and [INFO] [stdout] 23 | | wait until a value is sent down the channel. [INFO] [stdout] 24 | | Once a value is sent, recv will return it in a Result. [INFO] [stdout] 25 | | When the sending end of the channel closes, [INFO] [stdout] 26 | | recv will return an error to signal that no more values will be coming, pp. 401 */ [INFO] [stdout] | |__________________________________________________________________________________________^ [INFO] [stdout] 27 | let received = rx.recv().unwrap(); [INFO] [stdout] | ---------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / /** The spawned thread will now send multiple messages [INFO] [stdout] 34 | | and pause for a second between each message, pp. 403 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 35 | / thread::spawn(move || { [INFO] [stdout] 36 | | let vals = vec![ [INFO] [stdout] 37 | | String::from("hi"), [INFO] [stdout] 38 | | String::from("from"), [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | }); [INFO] [stdout] | |______- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | / /** We iterate over them, sending each individually, [INFO] [stdout] 43 | | and pause between each by calling the thread::sleep function [INFO] [stdout] 44 | | with a Duration value of 1 second */ [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] 45 | / for val in vals { [INFO] [stdout] 46 | | tx.send(val).unwrap(); [INFO] [stdout] 47 | | thread::sleep(Duration::from_secs(1)); [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / /** Treating rx as an iterator [INFO] [stdout] 52 | | For each value received, we’re printing it. [INFO] [stdout] 53 | | When the channel is closed, iteration will end. */ [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] 54 | / for received in rx { [INFO] [stdout] 55 | | println!("Got: {}", received); [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | / /** Use mpsc to create multiple threads that all send values to the same receiver. [INFO] [stdout] 62 | | We can do so by cloning the transmitting half of the channel */ [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] 63 | let tx1 = mpsc::Sender::clone(&tx); [INFO] [stdout] | ----------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap6/3_enum_sample.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap15/2_drop_samples.rs from 2018 edition to 2021 [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | /** We create an Rc instance holding a List value in the variable a with an initial list of 5, Nil. */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 32 | let a: Rc = Rc::new(Cons(5,RefCell::new(Rc::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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / /** We then create an Rc instance holding another List value in the variable b [INFO] [stdout] 37 | | that contains the value 10 and points to the list in a, pp. 381 */ [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] 38 | let b: Rc = Rc::new(Cons(10,RefCell::new(Rc::clone(&a)))); [INFO] [stdout] | ---------------------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / /** We modify a so it points to b instead of Nil, creating a cycle. [INFO] [stdout] 44 | | We do that by using the tail method to get a reference to the RefCell>. [INFO] [stdout] 45 | | Then we use the borrow_mut method on the RefCell> to change the value inside from an Rc [INFO] [stdout] 46 | | that holds a Nil value to the Rc in b, pp. 381 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 47 | / if let Some(link) = a.tail() { [INFO] [stdout] 48 | | *link.borrow_mut() = Rc::clone(&b); [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap9/3_result_matching_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap10/3_generic_trait_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap4/6_dangle_reference.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/bin/chap10/5_lifetime_generic_samples.rs (2 fixes) [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] = help: use `/* */` for a plain comment [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: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap6/5_enum_option.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap8/4_string_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap8/1_vec_sample.rs from 2018 edition to 2021 [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / /** The send function takes ownership of its parameter, [INFO] [stdout] 12 | | and when the value is moved, the receiver takes ownership of it. [INFO] [stdout] 13 | | This stops us from accidentally using the value again after sending it; [INFO] [stdout] 14 | | the ownership system checks that everything is okay, pp. 402 */ [INFO] [stdout] | |___________________________________________________________________________^ [INFO] [stdout] 15 | tx.send(val).unwrap(); [INFO] [stdout] | --------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / /** recv , short for receive, which will block the main thread’s execution and [INFO] [stdout] 23 | | wait until a value is sent down the channel. [INFO] [stdout] 24 | | Once a value is sent, recv will return it in a Result. [INFO] [stdout] 25 | | When the sending end of the channel closes, [INFO] [stdout] 26 | | recv will return an error to signal that no more values will be coming, pp. 401 */ [INFO] [stdout] | |__________________________________________________________________________________________^ [INFO] [stdout] 27 | let received = rx.recv().unwrap(); [INFO] [stdout] | ---------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / /** The spawned thread will now send multiple messages [INFO] [stdout] 34 | | and pause for a second between each message, pp. 403 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 35 | / thread::spawn(move || { [INFO] [stdout] 36 | | let vals = vec![ [INFO] [stdout] 37 | | String::from("hi"), [INFO] [stdout] 38 | | String::from("from"), [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | }); [INFO] [stdout] | |______- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | / /** We iterate over them, sending each individually, [INFO] [stdout] 43 | | and pause between each by calling the thread::sleep function [INFO] [stdout] 44 | | with a Duration value of 1 second */ [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] 45 | / for val in vals { [INFO] [stdout] 46 | | tx.send(val).unwrap(); [INFO] [stdout] 47 | | thread::sleep(Duration::from_secs(1)); [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / /** Treating rx as an iterator [INFO] [stdout] 52 | | For each value received, we’re printing it. [INFO] [stdout] 53 | | When the channel is closed, iteration will end. */ [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] 54 | / for received in rx { [INFO] [stdout] 55 | | println!("Got: {}", received); [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | / /** Use mpsc to create multiple threads that all send values to the same receiver. [INFO] [stdout] 62 | | We can do so by cloning the transmitting half of the channel */ [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] 63 | let tx1 = mpsc::Sender::clone(&tx); [INFO] [stdout] | ----------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap5/2_struct_rect_sample.rs from 2018 edition to 2021 [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / /** The lack of infinite output indicates that this code didn’t create a reference cycle. [INFO] [stdout] 41 | | We can also tell this by looking at the values we get from calling Rc::strong_count and Rc::weak_count */ [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/7_rc_weak_samples.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | /** leaf starts out without a parent, so we create a new, empty Weak reference instance, pp. 386 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 17 | / let leaf = Rc::new(Node { [INFO] [stdout] 18 | | value: 3, [INFO] [stdout] 19 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 20 | | children: RefCell::new(vec![]), [INFO] [stdout] 21 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | /** in an inner scope and examining strong and weak reference counts, pp. 388 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 47 | / let leaf = Rc::new(Node { [INFO] [stdout] 48 | | value: 3, [INFO] [stdout] 49 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 50 | | children: RefCell::new(vec![]), [INFO] [stdout] 51 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap6/2_enum_sample.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/bin/chap11/1_test_samples.rs (1 fix) [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: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap4/3_variable_ownership.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap8/3_vec_iter.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/bin/chap16/6_mutex_samples.rs (1 fix) [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/6_mutex_samples.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / /** Mutex is smart pointer. [INFO] [stdout] 21 | | The call to lock returns a MutexGuard wrapped in a LockResult [INFO] [stdout] 22 | | that we handled with the call to unwrap. [INFO] [stdout] 23 | | [INFO] [stdout] ... | [INFO] [stdout] 29 | | blocking the mutex from being used by other threads [INFO] [stdout] 30 | | because the lock release happens automatically, pp. 408 */ [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/chap16/6_mutex_samples.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / /** Sharing a Mutex Between Multiple Threads, pp. 408 */ [INFO] [stdout] 35 | | /** Compile Error [INFO] [stdout] 36 | | The error message states that the counter value was moved [INFO] [stdout] 37 | | in the previous iteration of the loop. [INFO] [stdout] ... | [INFO] [stdout] 56 | /| /** [INFO] [stdout] 57 | || let counter = Rc::clone(&counter); [INFO] [stdout] 58 | || [INFO] [stdout] 59 | || let mut handles = vec![]; [INFO] [stdout] ... || [INFO] [stdout] 71 | || println!("Result: {}", *counter.lock().unwrap()); [INFO] [stdout] 72 | || */ [INFO] [stdout] | ||______^ [INFO] [stdout] | |_______| [INFO] [stdout] | rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [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/chap16/6_mutex_samples.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / /** To access the data inside the mutex, we use the method to acquire the lock. [INFO] [stdout] 11 | | This call will block the current thread so it can’t do any work [INFO] [stdout] 12 | | until it’s our turn to have the lock. [INFO] [stdout] 13 | | [INFO] [stdout] 14 | | The call to lock would fail if another thread holding the lock panicked. [INFO] [stdout] 15 | | In that case, no one would ever be able to get the lock, [INFO] [stdout] 16 | | so we’ve chosen to unwrap and have this thread panic in that situation, pp. 407 */ [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] 17 | let mut num: MutexGuard = m.lock().unwrap(); [INFO] [stdout] | ------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap4/4_reference_borrowing.rs (1 fix) [INFO] [stderr] Migrating src/main.rs from 2018 edition to 2021 [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/3_thread_samples.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / /** The main thread will wait for the spawned thread to finish and [INFO] [stdout] 14 | | then run its for loop, so the output won’t be interleaved anymore, pp. 394 */ [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] 15 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning 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:13 [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] [stderr] Migrating src/bin/chap16/1_thread_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap15/1_box_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap4/5_mut_immut_references.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/bin/chap10/2_trait_samples.rs (2 fixes) [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap9/2_result_recoverable_samples.rs (1 fix) [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/2_thread_samples.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / /** Calling join on the handle blocks the thread currently running [INFO] [stdout] 19 | | until the thread represented by the handle terminates. [INFO] [stdout] 20 | | Blocking a thread means that thread is prevented from performing work or exiting. [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | The two threads continue alternating, [INFO] [stdout] 23 | | but the main thread waits because of the call to handle.join() and [INFO] [stdout] 24 | | does not end until the spawned thread is nished., pp. 393 */ [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] 25 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [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: 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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap16/4_closure_thread_samples.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/bin/chap4/7_string_slices.rs (1 fix) [INFO] [stderr] Fixed src/bin/chap15/2_drop_samples.rs (3 fixes) [INFO] [stderr] Migrating src/bin/chap10/6_lifetime_generic_samples.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap6/6_enum_if_let.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/bin/chap9/3_result_matching_samples.rs (1 fix) [INFO] [stderr] Migrating src/bin/chap15/3_rc_samples.rs from 2018 edition to 2021 [INFO] [stderr] Fixed src/bin/chap10/3_generic_trait_samples.rs (1 fix) [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap8/4_string_samples.rs (10 fixes) [INFO] [stderr] Migrating tests/integration_test.rs from 2018 edition to 2021 [INFO] [stderr] Migrating src/bin/chap13/1_closure_samples.rs from 2018 edition to 2021 [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: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / /** The lack of infinite output indicates that this code didn’t create a reference cycle. [INFO] [stdout] 41 | | We can also tell this by looking at the values we get from calling Rc::strong_count and Rc::weak_count */ [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/7_rc_weak_samples.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | /** leaf starts out without a parent, so we create a new, empty Weak reference instance, pp. 386 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 17 | / let leaf = Rc::new(Node { [INFO] [stdout] 18 | | value: 3, [INFO] [stdout] 19 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 20 | | children: RefCell::new(vec![]), [INFO] [stdout] 21 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | /** in an inner scope and examining strong and weak reference counts, pp. 388 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 47 | / let leaf = Rc::new(Node { [INFO] [stdout] 48 | | value: 3, [INFO] [stdout] 49 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 50 | | children: RefCell::new(vec![]), [INFO] [stdout] 51 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Migrating src/bin/chap8/2_vec_immut_ref.rs from 2018 edition to 2021 [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap4/5_mut_immut_references.rs (2 fixes) [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: 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] [stderr] Migrating src/bin/test2.rs from 2018 edition to 2021 [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: 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: 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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap16/4_closure_thread_samples.rs (1 fix) [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / /** The closure uses v, so it will capture v and make it part of the closure’s environment. [INFO] [stdout] 10 | | Because thread::spawn runs this closure in a new thread, [INFO] [stdout] 11 | | we should be able to access v inside that new thread. */ [INFO] [stdout] 12 | | /** Compile ERROR [INFO] [stdout] ... | [INFO] [stdout] 31 | | we force the closure to take ownership of the values it’s using [INFO] [stdout] 32 | | rather than allowing Rust to infer that it should borrow the values, pp. 397 */ [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] 33 | / let handle: JoinHandle<()> = thread::spawn(move || { [INFO] [stdout] 34 | | println!("Here's a vector: {:?}", v); [INFO] [stdout] 35 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / /** If we added move to the closure, we would move v into the closure’s environment, [INFO] [stdout] 38 | | and we could no longer call drop on it in the main thread, pp. 398 */ [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] 39 | // drop(v); // oh no! [INFO] [stdout] 40 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap15/3_rc_samples.rs (2 fixes) [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: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: 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] = help: use `/* */` for a plain comment [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 = 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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / /** The closure uses v, so it will capture v and make it part of the closure’s environment. [INFO] [stdout] 10 | | Because thread::spawn runs this closure in a new thread, [INFO] [stdout] 11 | | we should be able to access v inside that new thread. */ [INFO] [stdout] 12 | | /** Compile ERROR [INFO] [stdout] ... | [INFO] [stdout] 31 | | we force the closure to take ownership of the values it’s using [INFO] [stdout] 32 | | rather than allowing Rust to infer that it should borrow the values, pp. 397 */ [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] 33 | / let handle: JoinHandle<()> = thread::spawn(move || { [INFO] [stdout] 34 | | println!("Here's a vector: {:?}", v); [INFO] [stdout] 35 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / /** If we added move to the closure, we would move v into the closure’s environment, [INFO] [stdout] 38 | | and we could no longer call drop on it in the main thread, pp. 398 */ [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] 39 | // drop(v); // oh no! [INFO] [stdout] 40 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/6_mutex_samples.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / /** Mutex is smart pointer. [INFO] [stdout] 21 | | The call to lock returns a MutexGuard wrapped in a LockResult [INFO] [stdout] 22 | | that we handled with the call to unwrap. [INFO] [stdout] 23 | | [INFO] [stdout] ... | [INFO] [stdout] 29 | | blocking the mutex from being used by other threads [INFO] [stdout] 30 | | because the lock release happens automatically, pp. 408 */ [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/chap16/6_mutex_samples.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / /** Sharing a Mutex Between Multiple Threads, pp. 408 */ [INFO] [stdout] 35 | | /** Compile Error [INFO] [stdout] 36 | | The error message states that the counter value was moved [INFO] [stdout] 37 | | in the previous iteration of the loop. [INFO] [stdout] ... | [INFO] [stdout] 56 | /| /** [INFO] [stdout] 57 | || let counter = Rc::clone(&counter); [INFO] [stdout] 58 | || [INFO] [stdout] 59 | || let mut handles = vec![]; [INFO] [stdout] ... || [INFO] [stdout] 71 | || println!("Result: {}", *counter.lock().unwrap()); [INFO] [stdout] 72 | || */ [INFO] [stdout] | ||______^ [INFO] [stdout] | |_______| [INFO] [stdout] | rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [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/chap16/6_mutex_samples.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / /** To access the data inside the mutex, we use the method to acquire the lock. [INFO] [stdout] 11 | | This call will block the current thread so it can’t do any work [INFO] [stdout] 12 | | until it’s our turn to have the lock. [INFO] [stdout] 13 | | [INFO] [stdout] 14 | | The call to lock would fail if another thread holding the lock panicked. [INFO] [stdout] 15 | | In that case, no one would ever be able to get the lock, [INFO] [stdout] 16 | | so we’ve chosen to unwrap and have this thread panic in that situation, pp. 407 */ [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] 17 | let mut num: MutexGuard = m.lock().unwrap(); [INFO] [stdout] | ------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings 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] = help: use `/* */` for a plain comment [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: 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:13 [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 doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | /** We create an Rc instance holding a List value in the variable a with an initial list of 5, Nil. */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 32 | let a: Rc = Rc::new(Cons(5,RefCell::new(Rc::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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / /** We then create an Rc instance holding another List value in the variable b [INFO] [stdout] 37 | | that contains the value 10 and points to the list in a, pp. 381 */ [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] 38 | let b: Rc = Rc::new(Cons(10,RefCell::new(Rc::clone(&a)))); [INFO] [stdout] | ---------------------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / /** We modify a so it points to b instead of Nil, creating a cycle. [INFO] [stdout] 44 | | We do that by using the tail method to get a reference to the RefCell>. [INFO] [stdout] 45 | | Then we use the borrow_mut method on the RefCell> to change the value inside from an Rc [INFO] [stdout] 46 | | that holds a Nil value to the Rc in b, pp. 381 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 47 | / if let Some(link) = a.tail() { [INFO] [stdout] 48 | | *link.borrow_mut() = Rc::clone(&b); [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/2_thread_samples.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / /** Calling join on the handle blocks the thread currently running [INFO] [stdout] 19 | | until the thread represented by the handle terminates. [INFO] [stdout] 20 | | Blocking a thread means that thread is prevented from performing work or exiting. [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | The two threads continue alternating, [INFO] [stdout] 23 | | but the main thread waits because of the call to handle.join() and [INFO] [stdout] 24 | | does not end until the spawned thread is nished., pp. 393 */ [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] 25 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap8/2_vec_immut_ref.rs (1 fix) [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/3_thread_samples.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / /** The main thread will wait for the spawned thread to finish and [INFO] [stdout] 14 | | then run its for loop, so the output won’t be interleaved anymore, pp. 394 */ [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] 15 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [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: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: 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] = help: use `/* */` for a plain comment [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 = 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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings 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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/bin/chap13/2_closure_samples.rs (1 fix) [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings 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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 8.78s [INFO] [stderr] Running `cargo check` to verify 2021 [INFO] [stderr] Checking rust_prog_lang v0.1.0 (/tmp/fixit) [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: `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_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: `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/lib.rs:16:4 [INFO] [stdout] | [INFO] [stdout] 16 | fn serve_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: 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: `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: `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: `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: `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: 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: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 8 warnings 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] = help: use `/* */` for a plain comment [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/chap16/2_thread_samples.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / /** Calling join on the handle blocks the thread currently running [INFO] [stdout] 19 | | until the thread represented by the handle terminates. [INFO] [stdout] 20 | | Blocking a thread means that thread is prevented from performing work or exiting. [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | The two threads continue alternating, [INFO] [stdout] 23 | | but the main thread waits because of the call to handle.join() and [INFO] [stdout] 24 | | does not end until the spawned thread is nished., pp. 393 */ [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] 25 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / /** The send function takes ownership of its parameter, [INFO] [stdout] 12 | | and when the value is moved, the receiver takes ownership of it. [INFO] [stdout] 13 | | This stops us from accidentally using the value again after sending it; [INFO] [stdout] 14 | | the ownership system checks that everything is okay, pp. 402 */ [INFO] [stdout] | |___________________________________________________________________________^ [INFO] [stdout] 15 | tx.send(val).unwrap(); [INFO] [stdout] | --------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / /** recv , short for receive, which will block the main thread’s execution and [INFO] [stdout] 23 | | wait until a value is sent down the channel. [INFO] [stdout] 24 | | Once a value is sent, recv will return it in a Result. [INFO] [stdout] 25 | | When the sending end of the channel closes, [INFO] [stdout] 26 | | recv will return an error to signal that no more values will be coming, pp. 401 */ [INFO] [stdout] | |__________________________________________________________________________________________^ [INFO] [stdout] 27 | let received = rx.recv().unwrap(); [INFO] [stdout] | ---------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / /** The spawned thread will now send multiple messages [INFO] [stdout] 34 | | and pause for a second between each message, pp. 403 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 35 | / thread::spawn(move || { [INFO] [stdout] 36 | | let vals = vec![ [INFO] [stdout] 37 | | String::from("hi"), [INFO] [stdout] 38 | | String::from("from"), [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | }); [INFO] [stdout] | |______- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | / /** We iterate over them, sending each individually, [INFO] [stdout] 43 | | and pause between each by calling the thread::sleep function [INFO] [stdout] 44 | | with a Duration value of 1 second */ [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] 45 | / for val in vals { [INFO] [stdout] 46 | | tx.send(val).unwrap(); [INFO] [stdout] 47 | | thread::sleep(Duration::from_secs(1)); [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / /** Treating rx as an iterator [INFO] [stdout] 52 | | For each value received, we’re printing it. [INFO] [stdout] 53 | | When the channel is closed, iteration will end. */ [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] 54 | / for received in rx { [INFO] [stdout] 55 | | println!("Got: {}", received); [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | / /** Use mpsc to create multiple threads that all send values to the same receiver. [INFO] [stdout] 62 | | We can do so by cloning the transmitting half of the channel */ [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] 63 | let tx1 = mpsc::Sender::clone(&tx); [INFO] [stdout] | ----------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 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: 2 warnings emitted [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: 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: 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: 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: 6 warnings 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: 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: 1 warning 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: 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: 3 warnings 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] = help: use `/* */` for a plain comment [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/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] = help: use `/* */` for a plain comment [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: 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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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 = 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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / /** The lack of infinite output indicates that this code didn’t create a reference cycle. [INFO] [stdout] 41 | | We can also tell this by looking at the values we get from calling Rc::strong_count and Rc::weak_count */ [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/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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | /** leaf starts out without a parent, so we create a new, empty Weak reference instance, pp. 386 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 17 | / let leaf = Rc::new(Node { [INFO] [stdout] 18 | | value: 3, [INFO] [stdout] 19 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 20 | | children: RefCell::new(vec![]), [INFO] [stdout] 21 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | /** in an inner scope and examining strong and weak reference counts, pp. 388 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 47 | / let leaf = Rc::new(Node { [INFO] [stdout] 48 | | value: 3, [INFO] [stdout] 49 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 50 | | children: RefCell::new(vec![]), [INFO] [stdout] 51 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 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: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: 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] = help: use `/* */` for a plain comment [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 = 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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / /** The closure uses v, so it will capture v and make it part of the closure’s environment. [INFO] [stdout] 10 | | Because thread::spawn runs this closure in a new thread, [INFO] [stdout] 11 | | we should be able to access v inside that new thread. */ [INFO] [stdout] 12 | | /** Compile ERROR [INFO] [stdout] ... | [INFO] [stdout] 31 | | we force the closure to take ownership of the values it’s using [INFO] [stdout] 32 | | rather than allowing Rust to infer that it should borrow the values, pp. 397 */ [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] 33 | / let handle: JoinHandle<()> = thread::spawn(move || { [INFO] [stdout] 34 | | println!("Here's a vector: {:?}", v); [INFO] [stdout] 35 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / /** If we added move to the closure, we would move v into the closure’s environment, [INFO] [stdout] 38 | | and we could no longer call drop on it in the main thread, pp. 398 */ [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] 39 | // drop(v); // oh no! [INFO] [stdout] 40 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/6_mutex_samples.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / /** Mutex is smart pointer. [INFO] [stdout] 21 | | The call to lock returns a MutexGuard wrapped in a LockResult [INFO] [stdout] 22 | | that we handled with the call to unwrap. [INFO] [stdout] 23 | | [INFO] [stdout] ... | [INFO] [stdout] 29 | | blocking the mutex from being used by other threads [INFO] [stdout] 30 | | because the lock release happens automatically, pp. 408 */ [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/6_ref_cycle_samples.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | /** We create an Rc instance holding a List value in the variable a with an initial list of 5, Nil. */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 32 | let a: Rc = Rc::new(Cons(5,RefCell::new(Rc::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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/3_thread_samples.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / /** The main thread will wait for the spawned thread to finish and [INFO] [stdout] 14 | | then run its for loop, so the output won’t be interleaved anymore, pp. 394 */ [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] 15 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/6_mutex_samples.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / /** Sharing a Mutex Between Multiple Threads, pp. 408 */ [INFO] [stdout] 35 | | /** Compile Error [INFO] [stdout] 36 | | The error message states that the counter value was moved [INFO] [stdout] 37 | | in the previous iteration of the loop. [INFO] [stdout] ... | [INFO] [stdout] 56 | /| /** [INFO] [stdout] 57 | || let counter = Rc::clone(&counter); [INFO] [stdout] 58 | || [INFO] [stdout] 59 | || let mut handles = vec![]; [INFO] [stdout] ... || [INFO] [stdout] 71 | || println!("Result: {}", *counter.lock().unwrap()); [INFO] [stdout] 72 | || */ [INFO] [stdout] | ||______^ [INFO] [stdout] | |_______| [INFO] [stdout] | rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [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/6_ref_cycle_samples.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / /** We then create an Rc instance holding another List value in the variable b [INFO] [stdout] 37 | | that contains the value 10 and points to the list in a, pp. 381 */ [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] 38 | let b: Rc = Rc::new(Cons(10,RefCell::new(Rc::clone(&a)))); [INFO] [stdout] | ---------------------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/6_mutex_samples.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / /** To access the data inside the mutex, we use the method to acquire the lock. [INFO] [stdout] 11 | | This call will block the current thread so it can’t do any work [INFO] [stdout] 12 | | until it’s our turn to have the lock. [INFO] [stdout] 13 | | [INFO] [stdout] 14 | | The call to lock would fail if another thread holding the lock panicked. [INFO] [stdout] 15 | | In that case, no one would ever be able to get the lock, [INFO] [stdout] 16 | | so we’ve chosen to unwrap and have this thread panic in that situation, pp. 407 */ [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] 17 | let mut num: MutexGuard = m.lock().unwrap(); [INFO] [stdout] | ------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / /** We modify a so it points to b instead of Nil, creating a cycle. [INFO] [stdout] 44 | | We do that by using the tail method to get a reference to the RefCell>. [INFO] [stdout] 45 | | Then we use the borrow_mut method on the RefCell> to change the value inside from an Rc [INFO] [stdout] 46 | | that holds a Nil value to the Rc in b, pp. 381 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 47 | / if let Some(link) = a.tail() { [INFO] [stdout] 48 | | *link.borrow_mut() = Rc::clone(&b); [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [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: value assigned to `s2` is never read [INFO] [stdout] --> src/bin/chap4/1_variable_scope.rs:7:13 [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: 3 warnings emitted [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 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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | / /** The closure uses v, so it will capture v and make it part of the closure’s environment. [INFO] [stdout] 10 | | Because thread::spawn runs this closure in a new thread, [INFO] [stdout] 11 | | we should be able to access v inside that new thread. */ [INFO] [stdout] 12 | | /** Compile ERROR [INFO] [stdout] ... | [INFO] [stdout] 31 | | we force the closure to take ownership of the values it’s using [INFO] [stdout] 32 | | rather than allowing Rust to infer that it should borrow the values, pp. 397 */ [INFO] [stdout] | |_______________________________________________________________________________________^ [INFO] [stdout] 33 | / let handle: JoinHandle<()> = thread::spawn(move || { [INFO] [stdout] 34 | | println!("Here's a vector: {:?}", v); [INFO] [stdout] 35 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/4_closure_thread_samples.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / /** If we added move to the closure, we would move v into the closure’s environment, [INFO] [stdout] 38 | | and we could no longer call drop on it in the main thread, pp. 398 */ [INFO] [stdout] | |_____________________________________________________________________________^ [INFO] [stdout] 39 | // drop(v); // oh no! [INFO] [stdout] 40 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [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 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: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings 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/chap16/6_mutex_samples.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / /** Mutex is smart pointer. [INFO] [stdout] 21 | | The call to lock returns a MutexGuard wrapped in a LockResult [INFO] [stdout] 22 | | that we handled with the call to unwrap. [INFO] [stdout] 23 | | [INFO] [stdout] ... | [INFO] [stdout] 29 | | blocking the mutex from being used by other threads [INFO] [stdout] 30 | | because the lock release happens automatically, pp. 408 */ [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/chap16/6_mutex_samples.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / /** Sharing a Mutex Between Multiple Threads, pp. 408 */ [INFO] [stdout] 35 | | /** Compile Error [INFO] [stdout] 36 | | The error message states that the counter value was moved [INFO] [stdout] 37 | | in the previous iteration of the loop. [INFO] [stdout] ... | [INFO] [stdout] 56 | /| /** [INFO] [stdout] 57 | || let counter = Rc::clone(&counter); [INFO] [stdout] 58 | || [INFO] [stdout] 59 | || let mut handles = vec![]; [INFO] [stdout] ... || [INFO] [stdout] 71 | || println!("Result: {}", *counter.lock().unwrap()); [INFO] [stdout] 72 | || */ [INFO] [stdout] | ||______^ [INFO] [stdout] | |_______| [INFO] [stdout] | rustdoc does not generate documentation for macro invocations [INFO] [stdout] | [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/chap16/6_mutex_samples.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | / /** To access the data inside the mutex, we use the method to acquire the lock. [INFO] [stdout] 11 | | This call will block the current thread so it can’t do any work [INFO] [stdout] 12 | | until it’s our turn to have the lock. [INFO] [stdout] 13 | | [INFO] [stdout] 14 | | The call to lock would fail if another thread holding the lock panicked. [INFO] [stdout] 15 | | In that case, no one would ever be able to get the lock, [INFO] [stdout] 16 | | so we’ve chosen to unwrap and have this thread panic in that situation, pp. 407 */ [INFO] [stdout] | |______________________________________________________________________________________________^ [INFO] [stdout] 17 | let mut num: MutexGuard = m.lock().unwrap(); [INFO] [stdout] | ------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/2_thread_samples.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / /** Calling join on the handle blocks the thread currently running [INFO] [stdout] 19 | | until the thread represented by the handle terminates. [INFO] [stdout] 20 | | Blocking a thread means that thread is prevented from performing work or exiting. [INFO] [stdout] 21 | | [INFO] [stdout] 22 | | The two threads continue alternating, [INFO] [stdout] 23 | | but the main thread waits because of the call to handle.join() and [INFO] [stdout] 24 | | does not end until the spawned thread is nished., pp. 393 */ [INFO] [stdout] | |____________________________________________________________________^ [INFO] [stdout] 25 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [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: 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: 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: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | /** We create an Rc instance holding a List value in the variable a with an initial list of 5, Nil. */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 32 | let a: Rc = Rc::new(Cons(5,RefCell::new(Rc::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] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / /** We then create an Rc instance holding another List value in the variable b [INFO] [stdout] 37 | | that contains the value 10 and points to the list in a, pp. 381 */ [INFO] [stdout] | |__________________________________________________________________________^ [INFO] [stdout] 38 | let b: Rc = Rc::new(Cons(10,RefCell::new(Rc::clone(&a)))); [INFO] [stdout] | ---------------------------------------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/6_ref_cycle_samples.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / /** We modify a so it points to b instead of Nil, creating a cycle. [INFO] [stdout] 44 | | We do that by using the tail method to get a reference to the RefCell>. [INFO] [stdout] 45 | | Then we use the borrow_mut method on the RefCell> to change the value inside from an Rc [INFO] [stdout] 46 | | that holds a Nil value to the Rc in b, pp. 381 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 47 | / if let Some(link) = a.tail() { [INFO] [stdout] 48 | | *link.borrow_mut() = Rc::clone(&b); [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [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: 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] = help: use `/* */` for a plain comment [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | / /** The send function takes ownership of its parameter, [INFO] [stdout] 12 | | and when the value is moved, the receiver takes ownership of it. [INFO] [stdout] 13 | | This stops us from accidentally using the value again after sending it; [INFO] [stdout] 14 | | the ownership system checks that everything is okay, pp. 402 */ [INFO] [stdout] | |___________________________________________________________________________^ [INFO] [stdout] 15 | tx.send(val).unwrap(); [INFO] [stdout] | --------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | / /** recv , short for receive, which will block the main thread’s execution and [INFO] [stdout] 23 | | wait until a value is sent down the channel. [INFO] [stdout] 24 | | Once a value is sent, recv will return it in a Result. [INFO] [stdout] 25 | | When the sending end of the channel closes, [INFO] [stdout] 26 | | recv will return an error to signal that no more values will be coming, pp. 401 */ [INFO] [stdout] | |__________________________________________________________________________________________^ [INFO] [stdout] 27 | let received = rx.recv().unwrap(); [INFO] [stdout] | ---------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 33 | / /** The spawned thread will now send multiple messages [INFO] [stdout] 34 | | and pause for a second between each message, pp. 403 */ [INFO] [stdout] | |_______________________________________________________________^ [INFO] [stdout] 35 | / thread::spawn(move || { [INFO] [stdout] 36 | | let vals = vec![ [INFO] [stdout] 37 | | String::from("hi"), [INFO] [stdout] 38 | | String::from("from"), [INFO] [stdout] ... | [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | }); [INFO] [stdout] | |______- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:42:9 [INFO] [stdout] | [INFO] [stdout] 42 | / /** We iterate over them, sending each individually, [INFO] [stdout] 43 | | and pause between each by calling the thread::sleep function [INFO] [stdout] 44 | | with a Duration value of 1 second */ [INFO] [stdout] | |________________________________________________^ [INFO] [stdout] 45 | / for val in vals { [INFO] [stdout] 46 | | tx.send(val).unwrap(); [INFO] [stdout] 47 | | thread::sleep(Duration::from_secs(1)); [INFO] [stdout] 48 | | } [INFO] [stdout] | |_________- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:51:5 [INFO] [stdout] | [INFO] [stdout] 51 | / /** Treating rx as an iterator [INFO] [stdout] 52 | | For each value received, we’re printing it. [INFO] [stdout] 53 | | When the channel is closed, iteration will end. */ [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] 54 | / for received in rx { [INFO] [stdout] 55 | | println!("Got: {}", received); [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/5_channel_thread_samples.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | / /** Use mpsc to create multiple threads that all send values to the same receiver. [INFO] [stdout] 62 | | We can do so by cloning the transmitting half of the channel */ [INFO] [stdout] | |_______________________________________________________________________^ [INFO] [stdout] 63 | let tx1 = mpsc::Sender::clone(&tx); [INFO] [stdout] | ----------------------------------- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap16/3_thread_samples.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | / /** The main thread will wait for the spawned thread to finish and [INFO] [stdout] 14 | | then run its for loop, so the output won’t be interleaved anymore, pp. 394 */ [INFO] [stdout] | |_____________________________________________________________________________________^ [INFO] [stdout] 15 | handle.join().unwrap(); [INFO] [stdout] | ---------------------- rustdoc does not generate documentation for expressions [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / /** The lack of infinite output indicates that this code didn’t create a reference cycle. [INFO] [stdout] 41 | | We can also tell this by looking at the values we get from calling Rc::strong_count and Rc::weak_count */ [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/7_rc_weak_samples.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | /** leaf starts out without a parent, so we create a new, empty Weak reference instance, pp. 386 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 17 | / let leaf = Rc::new(Node { [INFO] [stdout] 18 | | value: 3, [INFO] [stdout] 19 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 20 | | children: RefCell::new(vec![]), [INFO] [stdout] 21 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/bin/chap15/7_rc_weak_samples.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | /** in an inner scope and examining strong and weak reference counts, pp. 388 */ [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 47 | / let leaf = Rc::new(Node { [INFO] [stdout] 48 | | value: 3, [INFO] [stdout] 49 | | parent: RefCell::new(Weak::new()), [INFO] [stdout] 50 | | children: RefCell::new(vec![]), [INFO] [stdout] 51 | | }); [INFO] [stdout] | |_______- rustdoc does not generate documentation for statements [INFO] [stdout] | [INFO] [stdout] = help: use `/* */` for a plain comment [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 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: 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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [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: value assigned to `s2` is never read [INFO] [stdout] --> src/bin/chap4/1_variable_scope.rs:7:13 [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: 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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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] = help: use `/* */` for a plain comment [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: 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: 1 warning emitted [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: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 0.59s [INFO] running `Command { std: "docker" "inspect" "f342f0d6f2143a1d6e4545d92467236d563a11f7054d8f07d151e84037c82b04", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f342f0d6f2143a1d6e4545d92467236d563a11f7054d8f07d151e84037c82b04", kill_on_drop: false }` [INFO] [stdout] f342f0d6f2143a1d6e4545d92467236d563a11f7054d8f07d151e84037c82b04