[INFO] cloning repository https://github.com/zhaomo08/rust_learn [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/zhaomo08/rust_learn" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzhaomo08%2Frust_learn", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzhaomo08%2Frust_learn'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d80bc25d46cd0a223e957f493140d819f5a309e3 [INFO] checking zhaomo08/rust_learn against try#8c500c7cefd54fd11d57295f3771d576be9ee415 for pr-145113 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzhaomo08%2Frust_learn" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/zhaomo08/rust_learn [INFO] finished tweaking git repo https://github.com/zhaomo08/rust_learn [INFO] tweaked toml for git repo https://github.com/zhaomo08/rust_learn written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/zhaomo08/rust_learn on toolchain 8c500c7cefd54fd11d57295f3771d576be9ee415 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8c500c7cefd54fd11d57295f3771d576be9ee415" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/zhaomo08/rust_learn 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" "+8c500c7cefd54fd11d57295f3771d576be9ee415" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:ae6f63d130afcfff7f91f5ba9fdb2a74d52830289c6a2ea2d23a94dcfb480a0d" "/opt/rustwide/cargo-home/bin/cargo" "+8c500c7cefd54fd11d57295f3771d576be9ee415" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 56dcb0fddbcc1f3e719947e462db6f4994bf5fafca7e7777d3e9e1fbee0299e3 [INFO] running `Command { std: "docker" "start" "-a" "56dcb0fddbcc1f3e719947e462db6f4994bf5fafca7e7777d3e9e1fbee0299e3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "56dcb0fddbcc1f3e719947e462db6f4994bf5fafca7e7777d3e9e1fbee0299e3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "56dcb0fddbcc1f3e719947e462db6f4994bf5fafca7e7777d3e9e1fbee0299e3", kill_on_drop: false }` [INFO] [stdout] 56dcb0fddbcc1f3e719947e462db6f4994bf5fafca7e7777d3e9e1fbee0299e3 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-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:ae6f63d130afcfff7f91f5ba9fdb2a74d52830289c6a2ea2d23a94dcfb480a0d" "/opt/rustwide/cargo-home/bin/cargo" "+8c500c7cefd54fd11d57295f3771d576be9ee415" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2d644df956066673ea9eae7c6fe4140ab65cef28b3652fcb450f320a556c7e15 [INFO] running `Command { std: "docker" "start" "-a" "2d644df956066673ea9eae7c6fe4140ab65cef28b3652fcb450f320a556c7e15", kill_on_drop: false }` [INFO] [stderr] Checking RUST_LEARN v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::f32::consts::E` [INFO] [stdout] --> src/bin/can_fix.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::f32::consts::E; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::future` [INFO] [stdout] --> src/bin/system-time.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::future; [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/bin/system-time.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `y` and `z` are never read [INFO] [stdout] --> src/bin/struct_generic.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct Point{ [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 2 | x: T, [INFO] [stdout] 3 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] 4 | z: U, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::slice` [INFO] [stdout] --> src/bin/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use core::slice; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::net::IpAddr` [INFO] [stdout] --> src/bin/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::net::IpAddr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/bin/main2.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 2 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 3 | x :u64, [INFO] [stdout] 4 | y :u64, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/bin/main2.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 2 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 3 | x :u64, [INFO] [stdout] 4 | y :u64, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/bin/ownership.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s2: String; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/bin/ownership.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/function.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | / thread::spawn(move || { [INFO] [stdout] 15 | | println!("{}",hello_message); [INFO] [stdout] 16 | | }).join(); [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] 14 | let _ = thread::spawn(move || { [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/bin/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let index= "5".parse::().unwrap(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unit` [INFO] [stdout] --> src/bin/main.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | 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/bin/main.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | let a = if cond { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `IPV6` is never constructed [INFO] [stdout] --> src/bin/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 12 | enum IPAddr { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 13 | IPv4(u8,u8,u8,u8), [INFO] [stdout] 14 | IPV6(u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8) [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Number` is never constructed [INFO] [stdout] --> src/bin/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 17 | enum Symbol { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 18 | Char(char), [INFO] [stdout] 19 | Number, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `s1` [INFO] [stdout] --> src/bin/ownership.rs:7:23 [INFO] [stdout] | [INFO] [stdout] 5 | let s1 = String::from("Hello World"); [INFO] [stdout] | -- move occurs because `s1` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 6 | let s2 = s1; [INFO] [stdout] | -- value moved here [INFO] [stdout] 7 | println!("{}",s1); [INFO] [stdout] | ^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 6 | let s2 = s1.clone(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `RUST_LEARN` (bin "ownership" test) due to 1 previous error; 2 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/panic.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/bin/panic.rs:1:15 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `x` is never used [INFO] [stdout] --> src/bin/struct_generic_three.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 6 | impl Point { [INFO] [stdout] | ---------------------------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::future` [INFO] [stdout] --> src/bin/system-time.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::future; [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/bin/system-time.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MESSAGE` is never used [INFO] [stdout] --> src/bin/mod.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | pub const MESSAGE: &str = "Hello World"; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_box` [INFO] [stdout] --> src/bin/box.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let a_box = Box::new(a); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a_box` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_box` [INFO] [stdout] --> src/bin/box.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let a_box = Box::new([0;1023 * 512]); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a_box` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/box.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let f = std::fs::read("/tmp/not_exist")?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/bin/super_self.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/bin/box.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add` is never used [INFO] [stdout] --> src/bin/panic.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MESSAGE` is never used [INFO] [stdout] --> src/bin/mod.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | pub const MESSAGE: &str = "Hello World"; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/panic.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/bin/panic.rs:1:15 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add` is never used [INFO] [stdout] --> src/bin/panic.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "2d644df956066673ea9eae7c6fe4140ab65cef28b3652fcb450f320a556c7e15", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2d644df956066673ea9eae7c6fe4140ab65cef28b3652fcb450f320a556c7e15", kill_on_drop: false }` [INFO] [stdout] 2d644df956066673ea9eae7c6fe4140ab65cef28b3652fcb450f320a556c7e15