[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#af4a5a13a15fa0c60e06321077ef452f769b42fd for pr-122960-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmasa-matt%2Frust-tutrial" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/masa-matt/rust-tutrial on toolchain af4a5a13a15fa0c60e06321077ef452f769b42fd [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "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-1-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" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "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] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [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-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4fed809da311de5f1472cffe21dbdb650071dfe90965d9911da83aa968341e19 [INFO] running `Command { std: "docker" "start" "-a" "4fed809da311de5f1472cffe21dbdb650071dfe90965d9911da83aa968341e19", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4fed809da311de5f1472cffe21dbdb650071dfe90965d9911da83aa968341e19", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4fed809da311de5f1472cffe21dbdb650071dfe90965d9911da83aa968341e19", kill_on_drop: false }` [INFO] [stdout] 4fed809da311de5f1472cffe21dbdb650071dfe90965d9911da83aa968341e19 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8ec60db58374d655e82fba8adf85604e80f6ac84fc46593f9fc29820f9337be9 [INFO] running `Command { std: "docker" "start" "-a" "8ec60db58374d655e82fba8adf85604e80f6ac84fc46593f9fc29820f9337be9", 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 gmp-mpfr-sys v1.5.0 [INFO] [stderr] Compiling az v1.2.1 [INFO] [stderr] Compiling rug v1.19.0 [INFO] [stderr] Checking ch11-03-test-organization v0.1.0 (/opt/rustwide/workdir/ch11/ch11-03-test-organization) [INFO] [stderr] Checking ch04-03-slices v0.1.0 (/opt/rustwide/workdir/ch04/ch04-03-slices) [INFO] [stderr] Checking ch05-02-example-structs v0.1.0 (/opt/rustwide/workdir/ch05/ch05-02-example-structs) [INFO] [stderr] Checking ch05-01-defining-structs v0.1.0 (/opt/rustwide/workdir/ch05/ch05-01-defining-structs) [INFO] [stderr] Checking getrandom v0.2.8 [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: unused variable: `user2` [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let user2 = build_user(String::from("someone@example.com"), String::from("someone")); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user2` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user3` [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let user3 = User { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_user3` [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] warning: unused variable: `black` [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:45:9 [INFO] [stdout] | [INFO] [stdout] 45 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | let origin = Point(0, 0, 0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user` [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let user = UserWithReferences { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_user` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `username`, `email`, `sign_in_count`, and `active` are never read [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 23 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 24 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 25 | email: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 26 | sign_in_count: u64, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] 27 | active: bool, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:42:18 [INFO] [stdout] | [INFO] [stdout] 42 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 42 | struct Color((), (), ()); [INFO] [stdout] | ~~ ~~ ~~ [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: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:43:18 [INFO] [stdout] | [INFO] [stdout] 43 | struct Point(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 43 | struct Point((), (), ()); [INFO] [stdout] | ~~ ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `UserWithReferences` is never constructed [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:49:8 [INFO] [stdout] | [INFO] [stdout] 49 | struct UserWithReferences { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `struct_with_references` is never used [INFO] [stdout] --> ch05/ch05-01-defining-structs/src/main.rs:57:4 [INFO] [stdout] | [INFO] [stdout] 57 | fn struct_with_references() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 11 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking ch06-03-if-let v0.1.0 (/opt/rustwide/workdir/ch06/ch06-03-if-let) [INFO] [stdout] warning: 10 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking ch11-01-writing-tests v0.1.0 (/opt/rustwide/workdir/ch11/ch11-01-writing-tests) [INFO] [stderr] Checking hello_cargo v0.1.0 (/opt/rustwide/workdir/ch01/ch01-03-hello-cargo) [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> ch06/ch06-03-if-let/src/main.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> ch06/ch06-03-if-let/src/main.rs:17:14 [INFO] [stdout] | [INFO] [stdout] 17 | _ => count += 1, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `count` is assigned to, but never used [INFO] [stdout] --> ch06/ch06-03-if-let/src/main.rs:28:13 [INFO] [stdout] | [INFO] [stdout] 28 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_count` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> ch06/ch06-03-if-let/src/main.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | count += 1; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Alabama` and `Alaska` are never constructed [INFO] [stdout] --> ch06/ch06-03-if-let/src/main.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 37 | enum UsState { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 38 | Alabama, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] 39 | Alaska, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `UsState` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Nickel`, `Dime`, and `Quarter` are never constructed [INFO] [stdout] --> ch06/ch06-03-if-let/src/main.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 43 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 44 | Penny, [INFO] [stdout] 45 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 46 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] 47 | Quarter(UsState), [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking ch04-02-references-and-borrowing v0.1.0 (/opt/rustwide/workdir/ch04/ch04-02-references-and-borrowing) [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [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 ch10-03-lifetime-syntax v0.1.0 (/opt/rustwide/workdir/ch10/ch10-03-lifetime-syntax) [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: 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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [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 variables v0.1.0 (/opt/rustwide/workdir/ch03/ch03-01-variables-and-mutability) [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: `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] [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] 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] [stderr] error: could not compile `ch04-02-references-and-borrowing` (bin "ch04-02-references-and-borrowing") due to 3 previous errors; 8 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `i` [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:73:9 [INFO] [stdout] | [INFO] [stdout] 73 | let i = ImportantExcerpt { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_i` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:119:9 [INFO] [stdout] | [INFO] [stdout] 119 | let s: &'static str = "I have a static lifetime."; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `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] warning: field `part` is never read [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 66 | struct ImportantExcerpt<'a> { [INFO] [stdout] | ---------------- field in this struct [INFO] [stdout] 67 | part: &'a str, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `first_word` is never used [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:79:4 [INFO] [stdout] | [INFO] [stdout] 79 | fn first_word(s: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [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: method `level` is never used [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:103:8 [INFO] [stdout] | [INFO] [stdout] 101 | impl<'a> ImportantExcerpt<'a> { [INFO] [stdout] | ----------------------------- method in this implementation [INFO] [stdout] 102 | // no need to speficy, because of second rule. [INFO] [stdout] 103 | fn level(&self) -> i32 { [INFO] [stdout] | ^^^^^ [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: method `announce_and_return_part` is never used [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:112:8 [INFO] [stdout] | [INFO] [stdout] 109 | impl<'a> ImportantExcerpt<'a> { [INFO] [stdout] | ----------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 112 | fn announce_and_return_part(&self, announcement: &str) -> &str { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [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 `static_lifetime` is never used [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:118:4 [INFO] [stdout] | [INFO] [stdout] 118 | fn static_lifetime() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generics_type_parameters_trait_bounds_liftimes` is never used [INFO] [stdout] --> ch10/ch10-03-lifetime-syntax/src/main.rs:122:4 [INFO] [stdout] | [INFO] [stdout] 122 | fn generics_type_parameters_trait_bounds_liftimes() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [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] warning: 11 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "8ec60db58374d655e82fba8adf85604e80f6ac84fc46593f9fc29820f9337be9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8ec60db58374d655e82fba8adf85604e80f6ac84fc46593f9fc29820f9337be9", kill_on_drop: false }` [INFO] [stdout] 8ec60db58374d655e82fba8adf85604e80f6ac84fc46593f9fc29820f9337be9