[INFO] cloning repository https://github.com/masa-matt/rust-tutrial [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/masa-matt/rust-tutrial" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmasa-matt%2Frust-tutrial", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmasa-matt%2Frust-tutrial'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f572f11c89d483c1e75e90de7350b967c35b7b45 [INFO] checking masa-matt/rust-tutrial against master#1f12b9b0fdbe735968ac002792a720f0ba4faca6 for crater-rollup-uwu [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmasa-matt%2Frust-tutrial" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/masa-matt/rust-tutrial on toolchain 1f12b9b0fdbe735968ac002792a720f0ba4faca6 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1f12b9b0fdbe735968ac002792a720f0ba4faca6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/masa-matt/rust-tutrial [INFO] finished tweaking git repo https://github.com/masa-matt/rust-tutrial [INFO] tweaked toml for git repo https://github.com/masa-matt/rust-tutrial written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/masa-matt/rust-tutrial already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1f12b9b0fdbe735968ac002792a720f0ba4faca6" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [ERROR] this task or one of its parent failed! [ERROR] no output for 300 seconds [ERROR] note: run with `RUST_BACKTRACE=1` to display a backtrace. [INFO] checking masa-matt/rust-tutrial against try#f9935d29d867449445ee008640ccca1bf1ae0889+rustflags=-Dtail_expr_drop_order for crater-rollup-uwu [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmasa-matt%2Frust-tutrial" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/masa-matt/rust-tutrial on toolchain f9935d29d867449445ee008640ccca1bf1ae0889 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f9935d29d867449445ee008640ccca1bf1ae0889" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/masa-matt/rust-tutrial [INFO] finished tweaking git repo https://github.com/masa-matt/rust-tutrial [INFO] tweaked toml for git repo https://github.com/masa-matt/rust-tutrial written to /workspace/builds/worker-5-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/masa-matt/rust-tutrial already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f9935d29d867449445ee008640ccca1bf1ae0889" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded az v1.2.1 [INFO] [stderr] Downloaded rug v1.19.0 [INFO] [stderr] Downloaded gmp-mpfr-sys v1.5.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+f9935d29d867449445ee008640ccca1bf1ae0889" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 66f55708b9c8cbf090325153a9011626bb0efc60f784dd90bc848815b631936a [INFO] running `Command { std: "docker" "start" "-a" "66f55708b9c8cbf090325153a9011626bb0efc60f784dd90bc848815b631936a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "66f55708b9c8cbf090325153a9011626bb0efc60f784dd90bc848815b631936a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "66f55708b9c8cbf090325153a9011626bb0efc60f784dd90bc848815b631936a", kill_on_drop: false }` [INFO] [stdout] 66f55708b9c8cbf090325153a9011626bb0efc60f784dd90bc848815b631936a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid -Dtail_expr_drop_order" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:923055f121b5182466d55868a8b05e67af8ba4a3a3f6bad814e953ca3cd3ac2a" "/opt/rustwide/cargo-home/bin/cargo" "+f9935d29d867449445ee008640ccca1bf1ae0889" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c37da428b9ce3ee01a126913dbb10709f79a0e6b7812b12faec6a78c79a9cb0b [INFO] running `Command { std: "docker" "start" "-a" "c37da428b9ce3ee01a126913dbb10709f79a0e6b7812b12faec6a78c79a9cb0b", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling libc v0.2.139 [INFO] [stderr] Compiling gmp-mpfr-sys v1.5.0 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Compiling az v1.2.1 [INFO] [stderr] Compiling rug v1.19.0 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking ch11-03-test-organization v0.1.0 (/opt/rustwide/workdir/ch11/ch11-03-test-organization) [INFO] [stderr] Checking ch09-02-recoverable-errors-with-result v0.1.0 (/opt/rustwide/workdir/ch09/ch09-02-recoverable-errors-with-result) [INFO] [stderr] Checking hello_cargo v0.1.0 (/opt/rustwide/workdir/ch01/ch01-03-hello-cargo) [INFO] [stderr] Checking ch03-02-data-types v0.1.0 (/opt/rustwide/workdir/ch03/ch03-02-data-types) [INFO] [stderr] Checking ch04-02-references-and-borrowing v0.1.0 (/opt/rustwide/workdir/ch04/ch04-02-references-and-borrowing) [INFO] [stderr] Checking ch09-01-unrecoverable-errors-with-panic v0.1.0 (/opt/rustwide/workdir/ch09/ch09-01-unrecoverable-errors-with-panic) [INFO] [stderr] Checking ch10-00-generics v0.1.0 (/opt/rustwide/workdir/ch10/ch10-00-generics) [INFO] [stderr] Checking ch11-01-writing-tests v0.1.0 (/opt/rustwide/workdir/ch11/ch11-01-writing-tests) [INFO] [stderr] Checking ch03-04-comments v0.1.0 (/opt/rustwide/workdir/ch03/ch03-04-comments) [INFO] [stderr] Checking ch04-03-slices v0.1.0 (/opt/rustwide/workdir/ch04/ch04-03-slices) [INFO] [stderr] Checking ch04-01-what-is-ownership v0.1.0 (/opt/rustwide/workdir/ch04/ch04-01-what-is-ownership) [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:68:16 [INFO] [stdout] | [INFO] [stdout] 68 | fn dangle() -> &String { [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from [INFO] [stdout] help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static` [INFO] [stdout] | [INFO] [stdout] 68 | fn dangle() -> &'static String { [INFO] [stdout] | +++++++ [INFO] [stdout] help: instead, you are more likely to want to return an owned value [INFO] [stdout] | [INFO] [stdout] 68 - fn dangle() -> &String { [INFO] [stdout] 68 + fn dangle() -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking ch11-02-running-tests v0.1.0 (/opt/rustwide/workdir/ch11/ch11-02-running-tests) [INFO] [stdout] warning: unused variable: `greeting_file` [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let greeting_file = match greeting_file_result { [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_greeting_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let f = File::open("hello.txt").unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | let f = File::open("hello.txt").expect("Failed to open hello.txt"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `panic` is never used [INFO] [stdout] --> ch09/ch09-01-unrecoverable-errors-with-panic/src/main.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn panic() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `type_result` is never used [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn type_result() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `error_handling` is never used [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | fn error_handling() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `error_unwrap` is never used [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:47:4 [INFO] [stdout] | [INFO] [stdout] 47 | fn error_unwrap() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `error_expected` is never used [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:51:4 [INFO] [stdout] | [INFO] [stdout] 51 | fn error_expected() { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_username_from_file` is never used [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:55:4 [INFO] [stdout] | [INFO] [stdout] 55 | fn read_username_from_file() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `error_shortcut` is never used [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:71:4 [INFO] [stdout] | [INFO] [stdout] 71 | fn error_shortcut() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `error_shortcut_shorter` is never used [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:78:4 [INFO] [stdout] | [INFO] [stdout] 78 | fn error_shortcut_shorter() -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: these values and local bindings have significant drop implementation that will have a different drop order from that of Edition 2021 [INFO] [stdout] --> ch09/ch09-02-recoverable-errors-with-result/src/main.rs:65:11 [INFO] [stdout] | [INFO] [stdout] 56 | let username_file_result = File::open("hello.txt"); [INFO] [stdout] | -------------------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 57 | [INFO] [stdout] 58 | let mut username_file = match username_file_result { [INFO] [stdout] | ------------- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 59 | Ok(file) => file, [INFO] [stdout] | ---- these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] 60 | Err(e) => return Err(e), [INFO] [stdout] | - these values have significant drop implementation and will observe changes in drop order under Edition 2024 [INFO] [stdout] ... [INFO] [stdout] 65 | match username_file.read_to_string(&mut username) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #123739 [INFO] [stdout] = note: requested on the command line with `-D tail-expr-drop-order` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 11 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:29:11 [INFO] [stdout] | [INFO] [stdout] 29 | fn change(some_string: &String) { [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lucky_number` [INFO] [stdout] --> ch03/ch03-04-comments/src/main.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let lucky_number = 7; // I’m feeling lucky today [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_lucky_number` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `lucky_number` [INFO] [stdout] --> ch03/ch03-04-comments/src/main.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | let lucky_number = 7; [INFO] [stdout] | ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_lucky_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:50:13 [INFO] [stdout] | [INFO] [stdout] 50 | let r1 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r2` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let r2 = &mut s; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r1` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:57:9 [INFO] [stdout] | [INFO] [stdout] 57 | let r1 = &s2; // no problem [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r2` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let r2 = &s2; // no problem [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_r2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let mut s2 = String::from("hello"); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reference_to_nothing` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let reference_to_nothing = dangle(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_reference_to_nothing` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `ch09-02-recoverable-errors-with-result` (bin "ch09-02-recoverable-errors-with-result") due to 2 previous errors; 11 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let s = "Hello, world!"; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:36:9 [INFO] [stdout] | [INFO] [stdout] 36 | let word = string_slices_as_parameters(&my_string[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let word = string_slices_as_parameters(&my_string[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:40:9 [INFO] [stdout] | [INFO] [stdout] 40 | let word = first_word(&my_string); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let word = string_slices_as_parameters(&my_string_literal[0..6]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let word = string_slices_as_parameters(&my_string_literal[..]); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let word = string_slices_as_parameters(my_string_literal); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0515]: cannot return reference to local variable `s` [INFO] [stdout] --> ch04/ch04-02-references-and-borrowing/src/main.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | &s // we return a reference to the String, s [INFO] [stdout] | ^^ returns a reference to data owned by the current function [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let mut s = String::from("hello world"); [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors; 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0106, E0515. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0106`. [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 69 | let slice = &s[0..2]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:76:9 [INFO] [stdout] | [INFO] [stdout] 76 | let slice = &s[3..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `slice` [INFO] [stdout] --> ch04/ch04-03-slices/src/main.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | let slice = &s[0..len]; [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_slice` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> ch11/ch11-01-writing-tests/src/lib.rs:23:17 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn greeting(name: &str) -> String { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> ch11/ch11-01-writing-tests/src/lib.rs:11:8 [INFO] [stdout] | [INFO] [stdout] 11 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `can_hold` is never used [INFO] [stdout] --> ch11/ch11-01-writing-tests/src/lib.rs:17:8 [INFO] [stdout] | [INFO] [stdout] 16 | impl Rectangle { [INFO] [stdout] | -------------- method in this implementation [INFO] [stdout] 17 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `value` is never read [INFO] [stdout] --> ch11/ch11-01-writing-tests/src/lib.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 28 | pub struct Guess { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 29 | value: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `ch04-02-references-and-borrowing` (bin "ch04-02-references-and-borrowing" test) due to 3 previous errors; 8 warnings emitted [INFO] [stdout] warning: 11 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `prints_and_returns_10` is never used [INFO] [stdout] --> ch11/ch11-02-running-tests/src/lib.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn prints_and_returns_10(a: i32) -> 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: unused variable: `s1` [INFO] [stdout] --> ch04/ch04-01-what-is-ownership/src/main.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | let s1 = gives_ownership(); // gives_ownership moves its return [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> ch04/ch04-01-what-is-ownership/src/main.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | let s3 = takes_and_gives_back(s2); // s2 is moved into [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "c37da428b9ce3ee01a126913dbb10709f79a0e6b7812b12faec6a78c79a9cb0b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c37da428b9ce3ee01a126913dbb10709f79a0e6b7812b12faec6a78c79a9cb0b", kill_on_drop: false }` [INFO] [stdout] c37da428b9ce3ee01a126913dbb10709f79a0e6b7812b12faec6a78c79a9cb0b