[INFO] cloning repository https://github.com/liulinboyi/rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/liulinboyi/rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fliulinboyi%2Frust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fliulinboyi%2Frust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] af4ca473c5b4852c7e0ef41a03108ef62395539b [INFO] building liulinboyi/rust against master#11663cd3bfefef7d34e8f0892c250bf698049392+rustflags=-Dtail-expr-drop-order for pr-134523 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fliulinboyi%2Frust" "/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/liulinboyi/rust on toolchain 11663cd3bfefef7d34e8f0892c250bf698049392 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/liulinboyi/rust [INFO] finished tweaking git repo https://github.com/liulinboyi/rust [INFO] tweaked toml for git repo https://github.com/liulinboyi/rust written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/liulinboyi/rust 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" "+11663cd3bfefef7d34e8f0892c250bf698049392" "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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 592ce4bbd66eca5e0496ee252d6c97ce742263699ac1bc56575e731b59177992 [INFO] running `Command { std: "docker" "start" "-a" "592ce4bbd66eca5e0496ee252d6c97ce742263699ac1bc56575e731b59177992", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "592ce4bbd66eca5e0496ee252d6c97ce742263699ac1bc56575e731b59177992", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "592ce4bbd66eca5e0496ee252d6c97ce742263699ac1bc56575e731b59177992", kill_on_drop: false }` [INFO] [stdout] 592ce4bbd66eca5e0496ee252d6c97ce742263699ac1bc56575e731b59177992 [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 -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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 8880efc74087a1ff2151c2a6efa9cd753091a03f6658e717ed05824f1f75abec [INFO] running `Command { std: "docker" "start" "-a" "8880efc74087a1ff2151c2a6efa9cd753091a03f6658e717ed05824f1f75abec", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.106 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.15 [INFO] [stderr] Compiling getrandom v0.2.3 [INFO] [stderr] Compiling rand_core v0.6.3 [INFO] [stderr] Compiling rand_chacha v0.3.1 [INFO] [stderr] Compiling rand v0.8.4 [INFO] [stderr] Compiling hello v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `core::panic` [INFO] [stdout] --> src/error/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::panic; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::sleep` [INFO] [stdout] --> src/tiem/mod.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `files` [INFO] [stdout] --> src/error/mod.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | let files = file(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_files` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/error/mod.rs:147:12 [INFO] [stdout] | [INFO] [stdout] 147 | Ok(data) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/error/mod.rs:164:12 [INFO] [stdout] | [INFO] [stdout] 164 | Ok(data) => {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/error/mod.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | fn divide_by_three(x: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `content` [INFO] [stdout] --> src/error/mod.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | let content: &str = std::str::from_utf8(&data)?; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_content` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/guess_number.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | Err(err) => continue, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unit` [INFO] [stdout] --> src/my_struct.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let unit = Unit; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_unit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/my_type_conversion.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let a = [0u8, 0u8, 0u8, 0u8]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `box_arr` [INFO] [stdout] --> src/pointer_box/mod.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | let box_arr = Box::new(arr); // arr这个数据已经放到堆上面了,这个放到堆上面的动作一定会发生内存拷贝的 [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_box_arr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pointer_box/mod.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | let mut n1 = Node { [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: `value2` [INFO] [stdout] --> src/traits/mod.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | let value2 = 2; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_value2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s_ref1` [INFO] [stdout] --> src/traits/mod.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | let s_ref1 = &jack; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_s_ref1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s_ref2` [INFO] [stdout] --> src/traits/mod.rs:194:9 [INFO] [stdout] | [INFO] [stdout] 194 | let s_ref2 = &jack; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_s_ref2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_guess_number` is never used [INFO] [stdout] --> src/main.rs:136:4 [INFO] [stdout] | [INFO] [stdout] 136 | fn test_guess_number() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_use_key_words` is never used [INFO] [stdout] --> src/main.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn test_use_key_words() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `divide_by_three` is never used [INFO] [stdout] --> src/error/mod.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | fn divide_by_three(x: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `B` is never constructed [INFO] [stdout] --> src/expressions.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 121 | enum Alphabet { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] 122 | A, [INFO] [stdout] 123 | B, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Alphabet` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `B` is never constructed [INFO] [stdout] --> src/expressions.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 149 | enum Alphabet1 { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 150 | A(char), [INFO] [stdout] 151 | B, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `no_return` is never used [INFO] [stdout] --> src/function.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | fn no_return() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x`, `y`, and `z` are never read [INFO] [stdout] --> src/generics/mod.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 36 | struct PointM { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 37 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 38 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] 39 | z: U, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `PointM` 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 `x` and `y` are never read [INFO] [stdout] --> src/generics/mod.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 61 | struct Line { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 62 | x: Point, [INFO] [stdout] | ^ [INFO] [stdout] 63 | y: Point, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Line` 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 `name` is never read [INFO] [stdout] --> src/lifecycle/mod.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | struct PersonM<'a> { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 33 | name: &'a str, // 这是一个引用,引用了一个字符串,字符串本身有自己的生命周期 [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PersonM` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Fruit` is never used [INFO] [stdout] --> src/my_enum.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | enum Fruit { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Color` is never used [INFO] [stdout] --> src/my_enum.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | enum Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `IPv6` is never constructed [INFO] [stdout] --> src/my_enum.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 21 | enum IPAddr { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 22 | IPv4(u8, u8, u8, u8), [INFO] [stdout] 23 | IPv6( [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/pointer_box/mod.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | Cons(i32, Box), // 不直接包含List而是存储指向List的地址 [INFO] [stdout] | ---- ^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `List` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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] 32 | Cons((), ()), // 不直接包含List而是存储指向List的地址 [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `content` is never read [INFO] [stdout] --> src/pointer_box/mod.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 56 | struct Link { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 57 | next: Option>, [INFO] [stdout] 58 | content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Link` 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 `0` and `1` are never read [INFO] [stdout] --> src/pointer_box/mod.rs:122:14 [INFO] [stdout] | [INFO] [stdout] 122 | Cons(i32, Rc), [INFO] [stdout] | ---- ^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ListM` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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] 122 | Cons((), ()), [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `tag` is never read [INFO] [stdout] --> src/pointer_box/mod.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 142 | struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 143 | children: Rc>>>>, [INFO] [stdout] 144 | tag: String, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` 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 `name` is never read [INFO] [stdout] --> src/str_type/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | struct Student { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 7 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Student` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `show` is never used [INFO] [stdout] --> src/traits/mod.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn show(a: T) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> src/traits/mod.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 168 | struct Person { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 169 | name: T, [INFO] [stdout] 170 | age: U, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Person` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | pointer_box::pointer_box(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 169 | let _ = pointer_box::pointer_box(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:181:5 [INFO] [stdout] | [INFO] [stdout] 181 | str_type::str_type(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 181 | let _ = str_type::str_type(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/error/mod.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn error() { [INFO] [stdout] | -------------- move the `impl` block outside of this function `error` [INFO] [stdout] ... [INFO] [stdout] 101 | impl From for Error { [INFO] [stdout] | ^^^^^----^--------------^^^^^^----- [INFO] [stdout] | | | | [INFO] [stdout] | | | `Error` is not local [INFO] [stdout] | | `Error` is not local [INFO] [stdout] | `From` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/error/mod.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn error() { [INFO] [stdout] | -------------- move the `impl` block outside of this function `error` [INFO] [stdout] ... [INFO] [stdout] 107 | impl From for Error { [INFO] [stdout] | ^^^^^----^-------------------^^^^^^----- [INFO] [stdout] | | | | [INFO] [stdout] | | | `Error` is not local [INFO] [stdout] | | `Utf8Error` is not local [INFO] [stdout] | `From` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/function.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / thread::spawn(move || { [INFO] [stdout] 63 | | println!("{}", hello_message); [INFO] [stdout] 64 | | }) [INFO] [stdout] 65 | | .join(); // join 除非子线程退出,不然主线程会一直去等待 [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 62 | let _ = thread::spawn(move || { [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.35s [INFO] running `Command { std: "docker" "inspect" "8880efc74087a1ff2151c2a6efa9cd753091a03f6658e717ed05824f1f75abec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8880efc74087a1ff2151c2a6efa9cd753091a03f6658e717ed05824f1f75abec", kill_on_drop: false }` [INFO] [stdout] 8880efc74087a1ff2151c2a6efa9cd753091a03f6658e717ed05824f1f75abec [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 -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:f3a9d4ad9d972b27faf3965f35b62e55ba32bbce8f20bc8fe909558a86702fde" "/opt/rustwide/cargo-home/bin/cargo" "+11663cd3bfefef7d34e8f0892c250bf698049392" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b088bdf1a70b51b6106efd2745b7d8b834550e558e4b54b48cf4c9ed682cba2d [INFO] running `Command { std: "docker" "start" "-a" "b088bdf1a70b51b6106efd2745b7d8b834550e558e4b54b48cf4c9ed682cba2d", kill_on_drop: false }` [INFO] [stderr] Compiling hello v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `core::panic` [INFO] [stdout] --> src/error/mod.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::panic; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::sleep` [INFO] [stdout] --> src/tiem/mod.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `files` [INFO] [stdout] --> src/error/mod.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | let files = file(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_files` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/error/mod.rs:147:12 [INFO] [stdout] | [INFO] [stdout] 147 | Ok(data) => { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/error/mod.rs:164:12 [INFO] [stdout] | [INFO] [stdout] 164 | Ok(data) => {} [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `x` [INFO] [stdout] --> src/error/mod.rs:36:24 [INFO] [stdout] | [INFO] [stdout] 36 | fn divide_by_three(x: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_x` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `content` [INFO] [stdout] --> src/error/mod.rs:115:13 [INFO] [stdout] | [INFO] [stdout] 115 | let content: &str = std::str::from_utf8(&data)?; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_content` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `err` [INFO] [stdout] --> src/guess_number.rs:21:17 [INFO] [stdout] | [INFO] [stdout] 21 | Err(err) => continue, [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_err` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unit` [INFO] [stdout] --> src/my_struct.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let unit = Unit; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_unit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/my_type_conversion.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let a = [0u8, 0u8, 0u8, 0u8]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `box_arr` [INFO] [stdout] --> src/pointer_box/mod.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | let box_arr = Box::new(arr); // arr这个数据已经放到堆上面了,这个放到堆上面的动作一定会发生内存拷贝的 [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_box_arr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pointer_box/mod.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | let mut n1 = Node { [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: `value2` [INFO] [stdout] --> src/traits/mod.rs:100:13 [INFO] [stdout] | [INFO] [stdout] 100 | let value2 = 2; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_value2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s_ref1` [INFO] [stdout] --> src/traits/mod.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | let s_ref1 = &jack; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_s_ref1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s_ref2` [INFO] [stdout] --> src/traits/mod.rs:194:9 [INFO] [stdout] | [INFO] [stdout] 194 | let s_ref2 = &jack; [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_s_ref2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_guess_number` is never used [INFO] [stdout] --> src/main.rs:136:4 [INFO] [stdout] | [INFO] [stdout] 136 | fn test_guess_number() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_use_key_words` is never used [INFO] [stdout] --> src/main.rs:144:4 [INFO] [stdout] | [INFO] [stdout] 144 | fn test_use_key_words() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `divide_by_three` is never used [INFO] [stdout] --> src/error/mod.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 36 | fn divide_by_three(x: u32) -> u32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `B` is never constructed [INFO] [stdout] --> src/expressions.rs:123:9 [INFO] [stdout] | [INFO] [stdout] 121 | enum Alphabet { [INFO] [stdout] | -------- variant in this enum [INFO] [stdout] 122 | A, [INFO] [stdout] 123 | B, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Alphabet` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `B` is never constructed [INFO] [stdout] --> src/expressions.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 149 | enum Alphabet1 { [INFO] [stdout] | --------- variant in this enum [INFO] [stdout] 150 | A(char), [INFO] [stdout] 151 | B, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `no_return` is never used [INFO] [stdout] --> src/function.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | fn no_return() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `x`, `y`, and `z` are never read [INFO] [stdout] --> src/generics/mod.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 36 | struct PointM { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] 37 | x: T, [INFO] [stdout] | ^ [INFO] [stdout] 38 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] 39 | z: U, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `PointM` 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 `x` and `y` are never read [INFO] [stdout] --> src/generics/mod.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 61 | struct Line { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 62 | x: Point, [INFO] [stdout] | ^ [INFO] [stdout] 63 | y: Point, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Line` 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 `name` is never read [INFO] [stdout] --> src/lifecycle/mod.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 32 | struct PersonM<'a> { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 33 | name: &'a str, // 这是一个引用,引用了一个字符串,字符串本身有自己的生命周期 [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `PersonM` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Fruit` is never used [INFO] [stdout] --> src/my_enum.rs:8:10 [INFO] [stdout] | [INFO] [stdout] 8 | enum Fruit { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Color` is never used [INFO] [stdout] --> src/my_enum.rs:14:10 [INFO] [stdout] | [INFO] [stdout] 14 | enum Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `IPv6` is never constructed [INFO] [stdout] --> src/my_enum.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 21 | enum IPAddr { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 22 | IPv4(u8, u8, u8, u8), [INFO] [stdout] 23 | IPv6( [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/pointer_box/mod.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | Cons(i32, Box), // 不直接包含List而是存储指向List的地址 [INFO] [stdout] | ---- ^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `List` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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] 32 | Cons((), ()), // 不直接包含List而是存储指向List的地址 [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `content` is never read [INFO] [stdout] --> src/pointer_box/mod.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 56 | struct Link { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 57 | next: Option>, [INFO] [stdout] 58 | content: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Link` 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 `0` and `1` are never read [INFO] [stdout] --> src/pointer_box/mod.rs:122:14 [INFO] [stdout] | [INFO] [stdout] 122 | Cons(i32, Rc), [INFO] [stdout] | ---- ^^^ ^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `ListM` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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] 122 | Cons((), ()), [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `tag` is never read [INFO] [stdout] --> src/pointer_box/mod.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 142 | struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 143 | children: Rc>>>>, [INFO] [stdout] 144 | tag: String, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Node` 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 `name` is never read [INFO] [stdout] --> src/str_type/mod.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 6 | struct Student { [INFO] [stdout] | ------- field in this struct [INFO] [stdout] 7 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Student` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `show` is never used [INFO] [stdout] --> src/traits/mod.rs:19:4 [INFO] [stdout] | [INFO] [stdout] 19 | fn show(a: T) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `age` is never read [INFO] [stdout] --> src/traits/mod.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 168 | struct Person { [INFO] [stdout] | ------ field in this struct [INFO] [stdout] 169 | name: T, [INFO] [stdout] 170 | age: U, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Person` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:169:5 [INFO] [stdout] | [INFO] [stdout] 169 | pointer_box::pointer_box(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 169 | let _ = pointer_box::pointer_box(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/main.rs:181:5 [INFO] [stdout] | [INFO] [stdout] 181 | str_type::str_type(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 181 | let _ = str_type::str_type(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/error/mod.rs:101:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn error() { [INFO] [stdout] | -------------- move the `impl` block outside of this function `error` [INFO] [stdout] ... [INFO] [stdout] 101 | impl From for Error { [INFO] [stdout] | ^^^^^----^--------------^^^^^^----- [INFO] [stdout] | | | | [INFO] [stdout] | | | `Error` is not local [INFO] [stdout] | | `Error` is not local [INFO] [stdout] | `From` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/error/mod.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn error() { [INFO] [stdout] | -------------- move the `impl` block outside of this function `error` [INFO] [stdout] ... [INFO] [stdout] 107 | impl From for Error { [INFO] [stdout] | ^^^^^----^-------------------^^^^^^----- [INFO] [stdout] | | | | [INFO] [stdout] | | | `Error` is not local [INFO] [stdout] | | `Utf8Error` is not local [INFO] [stdout] | `From` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/function.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / thread::spawn(move || { [INFO] [stdout] 63 | | println!("{}", hello_message); [INFO] [stdout] 64 | | }) [INFO] [stdout] 65 | | .join(); // join 除非子线程退出,不然主线程会一直去等待 [INFO] [stdout] | |___________^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 62 | let _ = thread::spawn(move || { [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.60s [INFO] running `Command { std: "docker" "inspect" "b088bdf1a70b51b6106efd2745b7d8b834550e558e4b54b48cf4c9ed682cba2d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b088bdf1a70b51b6106efd2745b7d8b834550e558e4b54b48cf4c9ed682cba2d", kill_on_drop: false }` [INFO] [stdout] b088bdf1a70b51b6106efd2745b7d8b834550e558e4b54b48cf4c9ed682cba2d