[INFO] fetching crate unit19 0.1.0... [INFO] checking unit19-0.1.0 against master#8c32e313cccf7df531e2d49ffb8227bb92304aee for pr-145608-1 [INFO] extracting crate unit19 0.1.0 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate unit19 0.1.0 [INFO] finished tweaking crates.io crate unit19 0.1.0 [INFO] tweaked toml for crates.io crate unit19 0.1.0 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate unit19 0.1.0 on toolchain 8c32e313cccf7df531e2d49ffb8227bb92304aee [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate unit19 0.1.0 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" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] aa42f6b05e5ba594683ec57f19462551a7ee9eeac17ba8132c748eebf59f8164 [INFO] running `Command { std: "docker" "start" "-a" "aa42f6b05e5ba594683ec57f19462551a7ee9eeac17ba8132c748eebf59f8164", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aa42f6b05e5ba594683ec57f19462551a7ee9eeac17ba8132c748eebf59f8164", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aa42f6b05e5ba594683ec57f19462551a7ee9eeac17ba8132c748eebf59f8164", kill_on_drop: false }` [INFO] [stdout] aa42f6b05e5ba594683ec57f19462551a7ee9eeac17ba8132c748eebf59f8164 [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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6c2cb35a75e2a6bdf0d9a2716c6f0dda592812f586aabcecbcf69296d44b3500 [INFO] running `Command { std: "docker" "start" "-a" "6c2cb35a75e2a6bdf0d9a2716c6f0dda592812f586aabcecbcf69296d44b3500", kill_on_drop: false }` [INFO] [stderr] Checking unit19 v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `slice` [INFO] [stdout] --> src/main.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | use std::{fmt, slice}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:102:1 [INFO] [stdout] | [INFO] [stdout] 102 | / /// extern函数 [INFO] [stdout] 103 | | /// [INFO] [stdout] 104 | | /// 在某些场景下,Rust代码可能需要与另外一种语言编写的代码进行交互。 [INFO] [stdout] 105 | | /// Rust为此提供了extern关键字来简化创建和使用外部函数接口(Foreign Function Interface,FFI)的过程。 [INFO] [stdout] ... | [INFO] [stdout] 112 | | /// 其中"C"指明了外部函数使用的应用二进制接口(Application Binary Interface,ABI):它被用来定义函数在汇编层面的调用方式。 [INFO] [stdout] 113 | | /// 我们使用的"C"ABI正是C编程语言的ABI,它也是最常见的ABI格式之一。 [INFO] [stdout] | |__________________________________________________________________^^ [INFO] [stdout] 114 | / extern "C" { [INFO] [stdout] 115 | | fn asb(input: i32) -> i32; [INFO] [stdout] 116 | | } [INFO] [stdout] | |_- rustdoc does not generate documentation for extern blocks [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `raw_pointer_address` [INFO] [stdout] --> src/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let raw_pointer_address = address as *const i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_raw_pointer_address` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `flag` [INFO] [stdout] --> src/main.rs:311:15 [INFO] [stdout] | [INFO] [stdout] 311 | fn empty_type(flag: i32) -> ! { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_flag` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/main.rs:377:27 [INFO] [stdout] | [INFO] [stdout] 377 | fn dyn_and_sized_trait(t: T) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/main.rs:384:37 [INFO] [stdout] | [INFO] [stdout] 384 | fn dyn_and_sized_trait_t(t: &T) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `HELLO_WORLD` is never used [INFO] [stdout] --> src/main.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | static HELLO_WORLD: &str = "Hello, World!"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `NUMBER` is never used [INFO] [stdout] --> src/main.rs:136:12 [INFO] [stdout] | [INFO] [stdout] 136 | static mut NUMBER: u32 = 0;// 可变静态变量,无论是访问还是修改都需要在不安全代码块中执行。 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `modify_static_variable` is never used [INFO] [stdout] --> src/main.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | fn modify_static_variable() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Foo` is never used [INFO] [stdout] --> src/main.rs:158:14 [INFO] [stdout] | [INFO] [stdout] 158 | unsafe trait Foo {} [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Add` is never used [INFO] [stdout] --> src/main.rs:179:7 [INFO] [stdout] | [INFO] [stdout] 179 | trait Add { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OtherPoint` is never constructed [INFO] [stdout] --> src/main.rs:190:8 [INFO] [stdout] | [INFO] [stdout] 190 | struct OtherPoint { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `empty_type` is never used [INFO] [stdout] --> src/main.rs:311:4 [INFO] [stdout] | [INFO] [stdout] 311 | fn empty_type(flag: i32) -> ! { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dyn_and_sized_trait` is never used [INFO] [stdout] --> src/main.rs:377:4 [INFO] [stdout] | [INFO] [stdout] 377 | fn dyn_and_sized_trait(t: T) {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dyn_and_sized_trait_t` is never used [INFO] [stdout] --> src/main.rs:384:4 [INFO] [stdout] | [INFO] [stdout] 384 | fn dyn_and_sized_trait_t(t: &T) {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:406:15 [INFO] [stdout] | [INFO] [stdout] 406 | Value(u32), [INFO] [stdout] | ----- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 406 - Value(u32), [INFO] [stdout] 406 + Value(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Stop` is never constructed [INFO] [stdout] --> src/main.rs:407:9 [INFO] [stdout] | [INFO] [stdout] 405 | enum Status { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 406 | Value(u32), [INFO] [stdout] 407 | Stop, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:150:32 [INFO] [stdout] | [INFO] [stdout] 150 | println!("NUMBER: {}", NUMBER); [INFO] [stdout] | ^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` 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/main.rs:263:5 [INFO] [stdout] | [INFO] [stdout] 246 | fn super_trait() { [INFO] [stdout] | ---------------- move the `impl` block outside of this function `super_trait` [INFO] [stdout] ... [INFO] [stdout] 263 | impl Display for Point { [INFO] [stdout] | ^^^^^-------^^^^^----- [INFO] [stdout] | | | [INFO] [stdout] | | `Point` is not local [INFO] [stdout] | `Display` 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: unused import: `slice` [INFO] [stdout] --> src/main.rs:8:16 [INFO] [stdout] | [INFO] [stdout] 8 | use std::{fmt, slice}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused doc comment [INFO] [stdout] --> src/main.rs:102:1 [INFO] [stdout] | [INFO] [stdout] 102 | / /// extern函数 [INFO] [stdout] 103 | | /// [INFO] [stdout] 104 | | /// 在某些场景下,Rust代码可能需要与另外一种语言编写的代码进行交互。 [INFO] [stdout] 105 | | /// Rust为此提供了extern关键字来简化创建和使用外部函数接口(Foreign Function Interface,FFI)的过程。 [INFO] [stdout] ... | [INFO] [stdout] 112 | | /// 其中"C"指明了外部函数使用的应用二进制接口(Application Binary Interface,ABI):它被用来定义函数在汇编层面的调用方式。 [INFO] [stdout] 113 | | /// 我们使用的"C"ABI正是C编程语言的ABI,它也是最常见的ABI格式之一。 [INFO] [stdout] | |__________________________________________________________________^^ [INFO] [stdout] 114 | / extern "C" { [INFO] [stdout] 115 | | fn asb(input: i32) -> i32; [INFO] [stdout] 116 | | } [INFO] [stdout] | |_- rustdoc does not generate documentation for extern blocks [INFO] [stdout] | [INFO] [stdout] = help: use `//` for a plain comment [INFO] [stdout] = note: `#[warn(unused_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `raw_pointer_address` [INFO] [stdout] --> src/main.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 68 | let raw_pointer_address = address as *const i32; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_raw_pointer_address` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `flag` [INFO] [stdout] --> src/main.rs:311:15 [INFO] [stdout] | [INFO] [stdout] 311 | fn empty_type(flag: i32) -> ! { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_flag` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/main.rs:377:27 [INFO] [stdout] | [INFO] [stdout] 377 | fn dyn_and_sized_trait(t: T) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `t` [INFO] [stdout] --> src/main.rs:384:37 [INFO] [stdout] | [INFO] [stdout] 384 | fn dyn_and_sized_trait_t(t: &T) {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_t` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `HELLO_WORLD` is never used [INFO] [stdout] --> src/main.rs:135:8 [INFO] [stdout] | [INFO] [stdout] 135 | static HELLO_WORLD: &str = "Hello, World!"; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `NUMBER` is never used [INFO] [stdout] --> src/main.rs:136:12 [INFO] [stdout] | [INFO] [stdout] 136 | static mut NUMBER: u32 = 0;// 可变静态变量,无论是访问还是修改都需要在不安全代码块中执行。 [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `modify_static_variable` is never used [INFO] [stdout] --> src/main.rs:147:4 [INFO] [stdout] | [INFO] [stdout] 147 | fn modify_static_variable() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Foo` is never used [INFO] [stdout] --> src/main.rs:158:14 [INFO] [stdout] | [INFO] [stdout] 158 | unsafe trait Foo {} [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Add` is never used [INFO] [stdout] --> src/main.rs:179:7 [INFO] [stdout] | [INFO] [stdout] 179 | trait Add { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OtherPoint` is never constructed [INFO] [stdout] --> src/main.rs:190:8 [INFO] [stdout] | [INFO] [stdout] 190 | struct OtherPoint { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `empty_type` is never used [INFO] [stdout] --> src/main.rs:311:4 [INFO] [stdout] | [INFO] [stdout] 311 | fn empty_type(flag: i32) -> ! { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dyn_and_sized_trait` is never used [INFO] [stdout] --> src/main.rs:377:4 [INFO] [stdout] | [INFO] [stdout] 377 | fn dyn_and_sized_trait(t: T) {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `dyn_and_sized_trait_t` is never used [INFO] [stdout] --> src/main.rs:384:4 [INFO] [stdout] | [INFO] [stdout] 384 | fn dyn_and_sized_trait_t(t: &T) {} [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/main.rs:406:15 [INFO] [stdout] | [INFO] [stdout] 406 | Value(u32), [INFO] [stdout] | ----- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stdout] | [INFO] [stdout] 406 - Value(u32), [INFO] [stdout] 406 + Value(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Stop` is never constructed [INFO] [stdout] --> src/main.rs:407:9 [INFO] [stdout] | [INFO] [stdout] 405 | enum Status { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 406 | Value(u32), [INFO] [stdout] 407 | Stop, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/main.rs:150:32 [INFO] [stdout] | [INFO] [stdout] 150 | println!("NUMBER: {}", NUMBER); [INFO] [stdout] | ^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: `#[warn(static_mut_refs)]` 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/main.rs:263:5 [INFO] [stdout] | [INFO] [stdout] 246 | fn super_trait() { [INFO] [stdout] | ---------------- move the `impl` block outside of this function `super_trait` [INFO] [stdout] ... [INFO] [stdout] 263 | impl Display for Point { [INFO] [stdout] | ^^^^^-------^^^^^----- [INFO] [stdout] | | | [INFO] [stdout] | | `Point` is not local [INFO] [stdout] | `Display` 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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s [INFO] running `Command { std: "docker" "inspect" "6c2cb35a75e2a6bdf0d9a2716c6f0dda592812f586aabcecbcf69296d44b3500", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6c2cb35a75e2a6bdf0d9a2716c6f0dda592812f586aabcecbcf69296d44b3500", kill_on_drop: false }` [INFO] [stdout] 6c2cb35a75e2a6bdf0d9a2716c6f0dda592812f586aabcecbcf69296d44b3500