[INFO] cloning repository https://github.com/flikeok/rust_example [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/flikeok/rust_example" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflikeok%2Frust_example", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflikeok%2Frust_example'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5d7f73bbef7cd9c4ac23591a14b013d2337004a7 [INFO] building flikeok/rust_example against master#44f415c1d617ebc7b931a243b7b321ef8a6ca47c for pr-142134-abi-ast-error [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflikeok%2Frust_example" "/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/flikeok/rust_example on toolchain 44f415c1d617ebc7b931a243b7b321ef8a6ca47c [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+44f415c1d617ebc7b931a243b7b321ef8a6ca47c" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/flikeok/rust_example [INFO] finished tweaking git repo https://github.com/flikeok/rust_example [INFO] tweaked toml for git repo https://github.com/flikeok/rust_example written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/flikeok/rust_example 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" "+44f415c1d617ebc7b931a243b7b321ef8a6ca47c" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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:eea15d5475069c3ef791f10c2c6b5af2ee421ef2da1e680ecce1cba46243983b" "/opt/rustwide/cargo-home/bin/cargo" "+44f415c1d617ebc7b931a243b7b321ef8a6ca47c" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] fae97af728dcebc26ab173e96c2ad4d3c47dbe78df6784e12e945a1db6c0fbfc [INFO] running `Command { std: "docker" "start" "-a" "fae97af728dcebc26ab173e96c2ad4d3c47dbe78df6784e12e945a1db6c0fbfc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "fae97af728dcebc26ab173e96c2ad4d3c47dbe78df6784e12e945a1db6c0fbfc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fae97af728dcebc26ab173e96c2ad4d3c47dbe78df6784e12e945a1db6c0fbfc", kill_on_drop: false }` [INFO] [stdout] fae97af728dcebc26ab173e96c2ad4d3c47dbe78df6784e12e945a1db6c0fbfc [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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:eea15d5475069c3ef791f10c2c6b5af2ee421ef2da1e680ecce1cba46243983b" "/opt/rustwide/cargo-home/bin/cargo" "+44f415c1d617ebc7b931a243b7b321ef8a6ca47c" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9b047893611670601ba29a07db4fad3a46ccd987f9ed630b2a09aafdcf155bc2 [INFO] running `Command { std: "docker" "start" "-a" "9b047893611670601ba29a07db4fad3a46ccd987f9ed630b2a09aafdcf155bc2", kill_on_drop: false }` [INFO] [stderr] Compiling rust_example v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `CloseBox` and `OpenBox` [INFO] [stdout] --> src/ch10/structs.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use self::my::{CloseBox, OpenBox}; [INFO] [stdout] | ^^^^^^^^ ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `my::hello` [INFO] [stdout] --> src/ch10/uses.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | use my::hello; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::FromStr` [INFO] [stdout] --> src/ch18/errors.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::str::FromStr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashMap` and `HashSet` [INFO] [stdout] --> src/ch19/boxs.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/ch19/boxs.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/ch19/boxs.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `JoinHandle` and `self` [INFO] [stdout] --> src/ch19/boxs.rs:4:19 [INFO] [stdout] | [INFO] [stdout] 4 | use std::thread::{self, JoinHandle}; [INFO] [stdout] | ^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::process::Command` [INFO] [stdout] --> src/ch19/cmds.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::process::Command; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `File`, `Read`, `SeekFrom`, `Seek`, `Write`, `os::unix::fs::FileExt`, `path::Path`, `remove_file`, and `str::from_utf8` [INFO] [stdout] --> src/ch19/files.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | fs::{remove_file, File}, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^ [INFO] [stdout] 3 | io::{Read, Seek, SeekFrom, Write}, [INFO] [stdout] | ^^^^ ^^^^ ^^^^^^^^ ^^^^^ [INFO] [stdout] 4 | os::unix::fs::FileExt, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | path::Path, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 6 | str::from_utf8, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ffi::OsStr`, `path::Path`, `sync::mpsc`, and `thread` [INFO] [stdout] --> src/ch19/threads.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{ffi::OsStr, path::Path, sync::mpsc, thread}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/ch6/to_strings.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pub_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn pub_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `indirect_access` is never used [INFO] [stdout] --> src/ch10/mods.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn indirect_access() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pub_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:18:46 [INFO] [stdout] | [INFO] [stdout] 18 | pub(in crate::ch10::mods::my_mod) fn pub_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `self_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | pub(self) fn self_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `super_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | pub(super) fn super_hello() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_super_in_nested` is never used [INFO] [stdout] --> src/ch10/mods.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn call_super_in_nested() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_crate_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:34:23 [INFO] [stdout] | [INFO] [stdout] 34 | pub(crate) fn call_crate_hello() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenBox` is never constructed [INFO] [stdout] --> src/ch10/structs.rs:4:16 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct OpenBox { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CloseBox` is never constructed [INFO] [stdout] --> src/ch10/structs.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct CloseBox { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `print` are never used [INFO] [stdout] --> src/ch10/structs.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 12 | / impl CloseBox [INFO] [stdout] 13 | | where [INFO] [stdout] 14 | | T: std::fmt::Display, [INFO] [stdout] | |_____________________________- associated items in this implementation [INFO] [stdout] 15 | { [INFO] [stdout] 16 | pub fn new(t: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `world` is never used [INFO] [stdout] --> src/ch10/uses.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn world() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn call_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Animal` is never used [INFO] [stdout] --> src/ch16/traits.rs:1:7 [INFO] [stdout] | [INFO] [stdout] 1 | trait Animal { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Sheep` is never constructed [INFO] [stdout] --> src/ch16/traits.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Sheep { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_sheep` is never used [INFO] [stdout] --> src/ch16/traits.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Sheep { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 10 | pub fn new_sheep() -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_duck` is never used [INFO] [stdout] --> src/ch16/traits.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Duck { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 16 | pub fn new_duck() -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Duck` is never constructed [INFO] [stdout] --> src/ch16/traits.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct Duck { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `random_animal` is never used [INFO] [stdout] --> src/ch16/traits.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn random_animal(i: i32) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_string` is never used [INFO] [stdout] --> src/ch18/maps.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn map_string(s: Option) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `ParseIntResult` is never used [INFO] [stdout] --> src/ch18/results.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type ParseIntResult = Result; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `two_plus` is never used [INFO] [stdout] --> src/ch18/results.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn two_plus(l: String, r: String) -> ParseIntResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `double_first` is never used [INFO] [stdout] --> src/ch18/results.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn double_first(vec: Vec<&str>) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Stu` is never constructed [INFO] [stdout] --> src/ch19/boxs.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | struct Stu<'a> { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Stu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/ch19/boxs.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl<'a> Stu<'a> { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 13 | pub fn new(s: &'a str, i: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `a_plus_b` is never used [INFO] [stdout] --> src/ch19/boxs.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn a_plus_b(i: i32, j: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reverse` is never used [INFO] [stdout] --> src/ch2/tuple.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn reverse(left:i32,right:bool)->(bool,i32){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Matrix` is never constructed [INFO] [stdout] --> src/ch2/tuple.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | struct Matrix(f32, f32, f32, f32); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Matrix` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `trans` is never used [INFO] [stdout] --> src/ch2/tuple.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 33 | impl Matrix { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 36 | fn trans(&self)->Self{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `slice` is never used [INFO] [stdout] --> src/ch2/array.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn slice(s:&[i32]){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ch3/structs.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Stu(i32,String); [INFO] [stdout] | --- ^^^ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] = note: `Stu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `MY_WORLD` is never used [INFO] [stdout] --> src/ch3/consts.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | static MY_WORLD:&'static str = "hello"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NUM` is never used [INFO] [stdout] --> src/ch3/consts.rs:2:7 [INFO] [stdout] | [INFO] [stdout] 2 | const NUM:i32 = 10; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `MyInt` is never used [INFO] [stdout] --> src/ch5/types.rs:1:6 [INFO] [stdout] | [INFO] [stdout] 1 | type MyInt = i32; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Color` is never used [INFO] [stdout] --> src/ch8/ifs.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Color` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/ch8/ifs.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 80 | pub struct Stu { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 81 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 82 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply` is never used [INFO] [stdout] --> src/ch9/closure.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | fn apply(f: F) [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.34s [INFO] running `Command { std: "docker" "inspect" "9b047893611670601ba29a07db4fad3a46ccd987f9ed630b2a09aafdcf155bc2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9b047893611670601ba29a07db4fad3a46ccd987f9ed630b2a09aafdcf155bc2", kill_on_drop: false }` [INFO] [stdout] 9b047893611670601ba29a07db4fad3a46ccd987f9ed630b2a09aafdcf155bc2 [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=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-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:eea15d5475069c3ef791f10c2c6b5af2ee421ef2da1e680ecce1cba46243983b" "/opt/rustwide/cargo-home/bin/cargo" "+44f415c1d617ebc7b931a243b7b321ef8a6ca47c" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8c7a13f0901e4cbb9ddf8430a96c7bc8469af0daa5535edfbf46536bde7c963a [INFO] running `Command { std: "docker" "start" "-a" "8c7a13f0901e4cbb9ddf8430a96c7bc8469af0daa5535edfbf46536bde7c963a", kill_on_drop: false }` [INFO] [stdout] warning: unused imports: `CloseBox` and `OpenBox` [INFO] [stdout] --> src/ch10/structs.rs:1:16 [INFO] [stdout] | [INFO] [stdout] 1 | use self::my::{CloseBox, OpenBox}; [INFO] [stdout] | ^^^^^^^^ ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `my::hello` [INFO] [stdout] --> src/ch10/uses.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | use my::hello; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::str::FromStr` [INFO] [stdout] --> src/ch18/errors.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::str::FromStr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `HashMap` and `HashSet` [INFO] [stdout] --> src/ch19/boxs.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::{HashMap, HashSet}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/ch19/boxs.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::sync::Arc` [INFO] [stdout] --> src/ch19/boxs.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::sync::Arc; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `JoinHandle` and `self` [INFO] [stdout] --> src/ch19/boxs.rs:4:19 [INFO] [stdout] | [INFO] [stdout] 4 | use std::thread::{self, JoinHandle}; [INFO] [stdout] | ^^^^ ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::process::Command` [INFO] [stdout] --> src/ch19/cmds.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::process::Command; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `File`, `Read`, `SeekFrom`, `Seek`, `Write`, `os::unix::fs::FileExt`, `path::Path`, `remove_file`, and `str::from_utf8` [INFO] [stdout] --> src/ch19/files.rs:2:10 [INFO] [stdout] | [INFO] [stdout] 2 | fs::{remove_file, File}, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^ [INFO] [stdout] 3 | io::{Read, Seek, SeekFrom, Write}, [INFO] [stdout] | ^^^^ ^^^^ ^^^^^^^^ ^^^^^ [INFO] [stdout] 4 | os::unix::fs::FileExt, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | path::Path, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 6 | str::from_utf8, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ffi::OsStr`, `path::Path`, `sync::mpsc`, and `thread` [INFO] [stdout] --> src/ch19/threads.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{ffi::OsStr, path::Path, sync::mpsc, thread}; [INFO] [stdout] | ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/ch6/to_strings.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pub_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn pub_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `indirect_access` is never used [INFO] [stdout] --> src/ch10/mods.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn indirect_access() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pub_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:18:46 [INFO] [stdout] | [INFO] [stdout] 18 | pub(in crate::ch10::mods::my_mod) fn pub_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `self_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | pub(self) fn self_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `super_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | pub(super) fn super_hello() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_super_in_nested` is never used [INFO] [stdout] --> src/ch10/mods.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn call_super_in_nested() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_crate_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:34:23 [INFO] [stdout] | [INFO] [stdout] 34 | pub(crate) fn call_crate_hello() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenBox` is never constructed [INFO] [stdout] --> src/ch10/structs.rs:4:16 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct OpenBox { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CloseBox` is never constructed [INFO] [stdout] --> src/ch10/structs.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct CloseBox { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `print` are never used [INFO] [stdout] --> src/ch10/structs.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 12 | / impl CloseBox [INFO] [stdout] 13 | | where [INFO] [stdout] 14 | | T: std::fmt::Display, [INFO] [stdout] | |_____________________________- associated items in this implementation [INFO] [stdout] 15 | { [INFO] [stdout] 16 | pub fn new(t: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 20 | pub fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `world` is never used [INFO] [stdout] --> src/ch10/uses.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn world() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn call_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Animal` is never used [INFO] [stdout] --> src/ch16/traits.rs:1:7 [INFO] [stdout] | [INFO] [stdout] 1 | trait Animal { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Sheep` is never constructed [INFO] [stdout] --> src/ch16/traits.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Sheep { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_sheep` is never used [INFO] [stdout] --> src/ch16/traits.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Sheep { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 10 | pub fn new_sheep() -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_duck` is never used [INFO] [stdout] --> src/ch16/traits.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Duck { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 16 | pub fn new_duck() -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Duck` is never constructed [INFO] [stdout] --> src/ch16/traits.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct Duck { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `random_animal` is never used [INFO] [stdout] --> src/ch16/traits.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn random_animal(i: i32) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_string` is never used [INFO] [stdout] --> src/ch18/maps.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn map_string(s: Option) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `ParseIntResult` is never used [INFO] [stdout] --> src/ch18/results.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type ParseIntResult = Result; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `two_plus` is never used [INFO] [stdout] --> src/ch18/results.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn two_plus(l: String, r: String) -> ParseIntResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `double_first` is never used [INFO] [stdout] --> src/ch18/results.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn double_first(vec: Vec<&str>) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Stu` is never constructed [INFO] [stdout] --> src/ch19/boxs.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | struct Stu<'a> { [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Stu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/ch19/boxs.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | impl<'a> Stu<'a> { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 13 | pub fn new(s: &'a str, i: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `a_plus_b` is never used [INFO] [stdout] --> src/ch19/boxs.rs:96:4 [INFO] [stdout] | [INFO] [stdout] 96 | fn a_plus_b(i: i32, j: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reverse` is never used [INFO] [stdout] --> src/ch2/tuple.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn reverse(left:i32,right:bool)->(bool,i32){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Matrix` is never constructed [INFO] [stdout] --> src/ch2/tuple.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | struct Matrix(f32, f32, f32, f32); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Matrix` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `trans` is never used [INFO] [stdout] --> src/ch2/tuple.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 33 | impl Matrix { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 36 | fn trans(&self)->Self{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `slice` is never used [INFO] [stdout] --> src/ch2/array.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn slice(s:&[i32]){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ch3/structs.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Stu(i32,String); [INFO] [stdout] | --- ^^^ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] = note: `Stu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `MY_WORLD` is never used [INFO] [stdout] --> src/ch3/consts.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | static MY_WORLD:&'static str = "hello"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NUM` is never used [INFO] [stdout] --> src/ch3/consts.rs:2:7 [INFO] [stdout] | [INFO] [stdout] 2 | const NUM:i32 = 10; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `MyInt` is never used [INFO] [stdout] --> src/ch5/types.rs:1:6 [INFO] [stdout] | [INFO] [stdout] 1 | type MyInt = i32; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Color` is never used [INFO] [stdout] --> src/ch8/ifs.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Color` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/ch8/ifs.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 80 | pub struct Stu { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 81 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 82 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply` is never used [INFO] [stdout] --> src/ch9/closure.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | fn apply(f: F) [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling rust_example v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::str::FromStr` [INFO] [stdout] --> src/ch18/errors.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::str::FromStr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `JoinHandle` [INFO] [stdout] --> src/ch19/boxs.rs:4:25 [INFO] [stdout] | [INFO] [stdout] 4 | use std::thread::{self, JoinHandle}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `os::unix::fs::FileExt` and `str::from_utf8` [INFO] [stdout] --> src/ch19/files.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | os::unix::fs::FileExt, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 5 | path::Path, [INFO] [stdout] 6 | str::from_utf8, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt::format` [INFO] [stdout] --> src/ch6/to_strings.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::fmt::format; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `j` [INFO] [stdout] --> src/ch19/threads.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | for j in 0..10 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_j` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `inferred_type` is never read [INFO] [stdout] --> src/ch2/num_type.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut inferred_type = 12; // 根据下一行的赋值推断为 i64 类型 [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: value assigned to `mut_able` is never read [INFO] [stdout] --> src/ch2/num_type.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut mut_able = 12; // Mutable `i32` [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/ch8/ifs.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 71 | value => { [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 75 | _ => 0, [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `indirect_access` is never used [INFO] [stdout] --> src/ch10/mods.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn indirect_access() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pub_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:18:46 [INFO] [stdout] | [INFO] [stdout] 18 | pub(in crate::ch10::mods::my_mod) fn pub_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `self_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | pub(self) fn self_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn call_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/ch16/traits.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 5 | struct Sheep { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 6 | name: &'static str, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/ch16/traits.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 27 | struct Duck { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 28 | name: &'static str, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Color` is never used [INFO] [stdout] --> src/ch8/ifs.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Color` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> src/ch8/ifs.rs:82:5 [INFO] [stdout] | [INFO] [stdout] 80 | pub struct Stu { [INFO] [stdout] | --- field in this struct [INFO] [stdout] 81 | name: String, [INFO] [stdout] 82 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] rustc-LLVM ERROR: IO failure on output stream: No space left on device [INFO] [stderr] error: could not compile `rust_example` (lib test); 19 warnings emitted [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `/opt/rustwide/rustup-home/toolchains/44f415c1d617ebc7b931a243b7b321ef8a6ca47c/bin/rustc --crate-name rust_example --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=958c30167858c53b -C extra-filename=-e1bdd58721323b2f --out-dir /opt/rustwide/target/debug/deps -L dependency=/opt/rustwide/target/debug/deps --cap-lints=warn` (exit status: 101) [INFO] running `Command { std: "docker" "inspect" "8c7a13f0901e4cbb9ddf8430a96c7bc8469af0daa5535edfbf46536bde7c963a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c7a13f0901e4cbb9ddf8430a96c7bc8469af0daa5535edfbf46536bde7c963a", kill_on_drop: false }` [INFO] [stdout] 8c7a13f0901e4cbb9ddf8430a96c7bc8469af0daa5535edfbf46536bde7c963a