[INFO] cloning repository https://github.com/weiyinfu/learnRust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/weiyinfu/learnRust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fweiyinfu%2FlearnRust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fweiyinfu%2FlearnRust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e8ae9912ed3b3c3b6cee70eec8b73c7dad18becc [INFO] checking weiyinfu/learnRust against master#af4a5a13a15fa0c60e06321077ef452f769b42fd for pr-122960-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fweiyinfu%2FlearnRust" "/workspace/builds/worker-6-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/weiyinfu/learnRust on toolchain af4a5a13a15fa0c60e06321077ef452f769b42fd [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/weiyinfu/learnRust [INFO] finished tweaking git repo https://github.com/weiyinfu/learnRust [INFO] tweaked toml for git repo https://github.com/weiyinfu/learnRust written to /workspace/builds/worker-6-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/weiyinfu/learnRust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded ferris-says v0.1.2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] d1cd5aa60660578a191ebc69a77f6b87c75bc8d2c8461630e1283dee6140a0c5 [INFO] running `Command { std: "docker" "start" "-a" "d1cd5aa60660578a191ebc69a77f6b87c75bc8d2c8461630e1283dee6140a0c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "d1cd5aa60660578a191ebc69a77f6b87c75bc8d2c8461630e1283dee6140a0c5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d1cd5aa60660578a191ebc69a77f6b87c75bc8d2c8461630e1283dee6140a0c5", kill_on_drop: false }` [INFO] [stdout] d1cd5aa60660578a191ebc69a77f6b87c75bc8d2c8461630e1283dee6140a0c5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+af4a5a13a15fa0c60e06321077ef452f769b42fd" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] bc5e4494061b311552970c2e4407bd866107a0659a08b8372c71d16a1e99b924 [INFO] running `Command { std: "docker" "start" "-a" "bc5e4494061b311552970c2e4407bd866107a0659a08b8372c71d16a1e99b924", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.69 [INFO] [stderr] Compiling autocfg v1.0.0 [INFO] [stderr] Checking cfg-if v0.1.10 [INFO] [stderr] Compiling proc-macro2 v1.0.12 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Compiling unicode-xid v0.2.0 [INFO] [stderr] Checking bytes v0.5.4 [INFO] [stderr] Compiling cc v1.0.50 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling syn v1.0.18 [INFO] [stderr] Checking fnv v1.0.6 [INFO] [stderr] Checking futures-core v0.3.4 [INFO] [stderr] Checking slab v0.4.2 [INFO] [stderr] Checking itoa v0.4.5 [INFO] [stderr] Compiling indexmap v1.3.2 [INFO] [stderr] Compiling num-traits v0.2.11 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Checking pin-project-lite v0.1.4 [INFO] [stderr] Checking http v0.2.1 [INFO] [stderr] Compiling num-integer v0.1.42 [INFO] [stderr] Checking futures-sink v0.3.4 [INFO] [stderr] Compiling quote v1.0.4 [INFO] [stderr] Checking futures-task v0.3.4 [INFO] [stderr] Compiling httparse v1.3.4 [INFO] [stderr] Compiling ryu v1.0.4 [INFO] [stderr] Checking net2 v0.2.34 [INFO] [stderr] Checking iovec v0.1.4 [INFO] [stderr] Compiling backtrace-sys v0.1.35 [INFO] [stderr] Checking mio v0.6.22 [INFO] [stderr] Compiling serde v1.0.106 [INFO] [stderr] Checking rustc-demangle v0.1.16 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Checking unicode-width v0.1.7 [INFO] [stderr] Checking futures-util v0.3.4 [INFO] [stderr] Checking textwrap v0.11.0 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking time v0.1.43 [INFO] [stderr] Checking tokio v0.2.20 [INFO] [stderr] Checking strsim v0.8.0 [INFO] [stderr] Checking ansi_term v0.11.0 [INFO] [stderr] Checking vec_map v0.8.1 [INFO] [stderr] Checking try-lock v0.2.2 [INFO] [stderr] Checking clap v2.33.0 [INFO] [stderr] Checking want v0.3.0 [INFO] [stderr] Checking http-body v0.3.1 [INFO] [stderr] Checking backtrace v0.3.46 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Checking error-chain v0.10.0 [INFO] [stderr] Checking futures-channel v0.3.4 [INFO] [stderr] Checking smallvec v0.4.5 [INFO] [stderr] Checking tower-service v0.3.0 [INFO] [stderr] Checking chrono v0.4.11 [INFO] [stderr] Checking rand v0.3.23 [INFO] [stderr] Checking tokio-util v0.3.1 [INFO] [stderr] Checking h2 v0.2.4 [INFO] [stderr] Checking ferris-says v0.1.2 [INFO] [stderr] Compiling pin-project-internal v0.4.9 [INFO] [stderr] Compiling serde_derive v1.0.106 [INFO] [stderr] Checking serde_json v1.0.52 [INFO] [stderr] Checking pin-project v0.4.9 [INFO] [stderr] Checking hyper v0.13.5 [INFO] [stderr] Checking learnRust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: struct `Point` is never constructed [INFO] [stdout] --> src/bhSingleton.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Point { [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: trait `Area` is never used [INFO] [stdout] --> src/ccTrait.rs:13:7 [INFO] [stdout] | [INFO] [stdout] 13 | trait Area { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> src/ccTrait.rs:18:8 [INFO] [stdout] | [INFO] [stdout] 18 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Circle` is never constructed [INFO] [stdout] --> src/ccTrait.rs:30:8 [INFO] [stdout] | [INFO] [stdout] 30 | struct Circle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `b` is never used [INFO] [stdout] --> src/cnTest.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | fn b() {} [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `haha` is never used [INFO] [stdout] --> src/useFolder/mod.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn haha() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `haha` is never used [INFO] [stdout] --> src/useFolder/one.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn haha() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary trailing semicolon [INFO] [stdout] --> src/afStruct.rs:90:15 [INFO] [stdout] | [INFO] [stdout] 90 | enum No {}; [INFO] [stdout] | ^ help: remove this semicolon [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(redundant_semicolons)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 7 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::DerefMut` [INFO] [stdout] --> src/bin/03-链表小练习-实现move_next.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::ops::DerefMut; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::fmt` [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::fmt; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `serde::export::Formatter` [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use serde::export::Formatter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | let mut c = get_patterns(&mut dp, j, i).clone().to_vec(); [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: fields `name` and `age` are never read [INFO] [stdout] --> src/abPrint.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 67 | struct Node { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 68 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 69 | age: u32, [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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/abPrint.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | write!(f, "["); [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] = note: this warning originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/abPrint.rs:130:25 [INFO] [stdout] | [INFO] [stdout] 130 | write!(f, ","); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: this warning originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/abPrint.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | write!(f, "{}", self.0[i]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: this warning originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:134:52 [INFO] [stdout] | [INFO] [stdout] 134 | let mut c = get_patterns(&mut dp, j, i).clone().to_vec(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `[Vec]` does not implement `Clone`, so calling `clone` on `&[Vec]` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::DerefMut` [INFO] [stdout] --> src/bin/03-链表小练习-实现move_next.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::ops::DerefMut; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queenCount` should have a snake case name [INFO] [stdout] --> src/bin/14-基于面向对象的八皇后.rs:55:42 [INFO] [stdout] | [INFO] [stdout] 55 | fn go(&mut self, x: usize, y: usize, queenCount: i32) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `queen_count` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the item `rand` is imported redundantly [INFO] [stdout] --> src/bin/23-二叉树非递归遍历.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand; [INFO] [stdout] | ^^^^ the item `rand` is already defined by prelude [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::fmt` [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use core::fmt; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `serde::export::Formatter` [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use serde::export::Formatter; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:134:17 [INFO] [stdout] | [INFO] [stdout] 134 | let mut c = get_patterns(&mut dp, j, i).clone().to_vec(); [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: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> src/bin/40-手势密码的种数.rs:134:52 [INFO] [stdout] | [INFO] [stdout] 134 | let mut c = get_patterns(&mut dp, j, i).clone().to_vec(); [INFO] [stdout] | ^^^^^^^^ help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] = note: the type `[Vec]` does not implement `Clone`, so calling `clone` on `&[Vec]` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/bin/03-使用元组实现泛型链表.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 61 | struct Student { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 62 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 63 | age: i32, [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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the item `rand` is imported redundantly [INFO] [stdout] --> src/bin/23-二叉树非递归遍历.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use rand; [INFO] [stdout] | ^^^^ the item `rand` is already defined by prelude [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `a[_][_]`, as `Fn` closures cannot mutate their captured variables [INFO] [stdout] --> src/bin/13-闭包递归八皇后.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | a[x][y] = 1; [INFO] [stdout] | ^^^^^^^^^^^ cannot assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `a[_][_]`, as `Fn` closures cannot mutate their captured variables [INFO] [stdout] --> src/bin/13-闭包递归八皇后.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | a[x][y] = 0; [INFO] [stdout] | ^^^^^^^^^^^ cannot assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/bin/13-闭包递归八皇后.rs:46:14 [INFO] [stdout] | [INFO] [stdout] 12 | let canput = |x: &usize, y: &usize| { [INFO] [stdout] | ---------------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 21 | if a[xx as usize][yy as usize] != 0 { [INFO] [stdout] | - first borrow occurs due to use of `a` in closure [INFO] [stdout] ... [INFO] [stdout] 46 | go: &|g, x, y| { [INFO] [stdout] | ^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 55 | if canput(&x, &y) { [INFO] [stdout] | ------ immutable borrow later captured here by closure [INFO] [stdout] 56 | a[x][y] = 1; [INFO] [stdout] | - second borrow occurs due to use of `a` in closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0502, E0594. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0502`. [INFO] [stdout] [INFO] [stderr] error: could not compile `learnRust` (bin "13-闭包递归八皇后" test) due to 4 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `a[_][_]`, as `Fn` closures cannot mutate their captured variables [INFO] [stdout] --> src/bin/13-闭包递归八皇后.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | a[x][y] = 1; [INFO] [stdout] | ^^^^^^^^^^^ cannot assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0594]: cannot assign to `a[_][_]`, as `Fn` closures cannot mutate their captured variables [INFO] [stdout] --> src/bin/13-闭包递归八皇后.rs:58:17 [INFO] [stdout] | [INFO] [stdout] 58 | a[x][y] = 0; [INFO] [stdout] | ^^^^^^^^^^^ cannot assign [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `queenCount` should have a snake case name [INFO] [stdout] --> src/bin/14-基于面向对象的八皇后.rs:55:42 [INFO] [stdout] | [INFO] [stdout] 55 | fn go(&mut self, x: usize, y: usize, queenCount: i32) { [INFO] [stdout] | ^^^^^^^^^^ help: convert the identifier to snake case: `queen_count` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0502]: cannot borrow `a` as mutable because it is also borrowed as immutable [INFO] [stdout] --> src/bin/13-闭包递归八皇后.rs:46:14 [INFO] [stdout] | [INFO] [stdout] 12 | let canput = |x: &usize, y: &usize| { [INFO] [stdout] | ---------------------- immutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 21 | if a[xx as usize][yy as usize] != 0 { [INFO] [stdout] | - first borrow occurs due to use of `a` in closure [INFO] [stdout] ... [INFO] [stdout] 46 | go: &|g, x, y| { [INFO] [stdout] | ^^^^^^^^^ mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 55 | if canput(&x, &y) { [INFO] [stdout] | ------ immutable borrow later captured here by closure [INFO] [stdout] 56 | a[x][y] = 1; [INFO] [stdout] | - second borrow occurs due to use of `a` in closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0502, E0594. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0502`. [INFO] [stdout] [INFO] [stderr] error: could not compile `learnRust` (bin "13-闭包递归八皇后") due to 4 previous errors [INFO] [stdout] warning: irrefutable `if let` pattern [INFO] [stdout] --> src/axIfLet.rs:153:8 [INFO] [stdout] | [INFO] [stdout] 153 | if let Node { value } = x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern will always match, so the `if let` is useless [INFO] [stdout] = help: consider replacing the `if let` with a `let` [INFO] [stdout] = note: `#[warn(irrefutable_let_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: irrefutable `if let` pattern [INFO] [stdout] --> src/axIfLet.rs:171:8 [INFO] [stdout] | [INFO] [stdout] 171 | if let Node(value) = x { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this pattern will always match, so the `if let` is useless [INFO] [stdout] = help: consider replacing the `if let` with a `let` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/axIfLet.rs:178:9 [INFO] [stdout] | [INFO] [stdout] 176 | Node(value) => println!("value is {}", value), [INFO] [stdout] | ----------- matches any value [INFO] [stdout] 177 | //下面这个分支永远不会执行到 [INFO] [stdout] 178 | Node(3) => println!("value is 3"), [INFO] [stdout] | ^^^^^^^ unreachable pattern [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/abPrint.rs:68:13 [INFO] [stdout] | [INFO] [stdout] 67 | struct Node { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 68 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 69 | age: u32, [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] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/adDataTypes.rs:118:28 [INFO] [stdout] | [INFO] [stdout] 118 | struct TupleStruct(String, i32); [INFO] [stdout] | ----------- ^^^^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = note: `TupleStruct` 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] 118 | struct TupleStruct((), ()); [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/adDataTypes.rs:122:13 [INFO] [stdout] | [INFO] [stdout] 121 | struct CStruct { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 122 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 123 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `CStruct` 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/aeEnum.rs:60:20 [INFO] [stdout] | [INFO] [stdout] 60 | User { name: String, age: i32 }, [INFO] [stdout] | ---- ^^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `xNode` is never constructed [INFO] [stdout] --> src/aeEnum.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 58 | enum Day { [INFO] [stdout] | --- variant in this enum [INFO] [stdout] 59 | xNode(i32), [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/aeEnum.rs:73:18 [INFO] [stdout] | [INFO] [stdout] 73 | moon(String), [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] 73 | moon(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Move`, `Write`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/aeEnum.rs:86:13 [INFO] [stdout] | [INFO] [stdout] 84 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 85 | Quit, [INFO] [stdout] 86 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 87 | Write(String), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 88 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/afStruct.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 28 | struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 29 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `one`, `two`, and `four` are never used [INFO] [stdout] --> src/afStruct.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 45 | impl Node { [INFO] [stdout] | --------- associated items in this implementation [INFO] [stdout] 46 | fn one() { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 49 | fn two(&self) { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | fn four(&mut self) { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `age`, and `address` are never read [INFO] [stdout] --> src/afStruct.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 68 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 69 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 70 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] 71 | address: String, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `User` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Node` is never constructed [INFO] [stdout] --> src/afStruct.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | struct Node; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `No` is never used [INFO] [stdout] --> src/afStruct.rs:90:10 [INFO] [stdout] | [INFO] [stdout] 90 | enum No {}; [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/afStruct.rs:96:17 [INFO] [stdout] | [INFO] [stdout] 96 | struct Node(i32, i32); [INFO] [stdout] | ---- ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 96 | struct Node((), ()); [INFO] [stdout] | ~~ ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple variants are never constructed [INFO] [stdout] --> src/apMatch.rs:52:13 [INFO] [stdout] | [INFO] [stdout] 50 | enum Color { [INFO] [stdout] | ----- variants in this enum [INFO] [stdout] 51 | // 这三个取值仅由它们的名字(而非类型)来指定。 [INFO] [stdout] 52 | Red, [INFO] [stdout] | ^^^ [INFO] [stdout] 53 | Blue, [INFO] [stdout] | ^^^^ [INFO] [stdout] 54 | Green, [INFO] [stdout] | ^^^^^ [INFO] [stdout] ... [INFO] [stdout] 57 | HSV(u32, u32, u32), [INFO] [stdout] | ^^^ [INFO] [stdout] 58 | HSL(u32, u32, u32), [INFO] [stdout] | ^^^ [INFO] [stdout] 59 | CMY(u32, u32, u32), [INFO] [stdout] | ^^^ [INFO] [stdout] 60 | CMYK(u32, u32, u32, u32), [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/apMatch.rs:119:13 [INFO] [stdout] | [INFO] [stdout] 117 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 118 | x: i32, [INFO] [stdout] 119 | y: i32, [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Missing` is never constructed [INFO] [stdout] --> src/apMatch.rs:130:13 [INFO] [stdout] | [INFO] [stdout] 128 | enum OptionalInt { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] 129 | Value(i32), [INFO] [stdout] 130 | Missing, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Err` is never constructed [INFO] [stdout] --> src/aqUsefulStruct.rs:69:9 [INFO] [stdout] | [INFO] [stdout] 67 | enum Res { [INFO] [stdout] | --- variant in this enum [INFO] [stdout] 68 | OK(T), [INFO] [stdout] 69 | Err(E), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/bcOwnership.rs:45:21 [INFO] [stdout] | [INFO] [stdout] 45 | struct Node(i32); [INFO] [stdout] | ---- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [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] 45 | struct Node(()); [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `longest` is never used [INFO] [stdout] --> src/bfLifetime.rs:111:8 [INFO] [stdout] | [INFO] [stdout] 111 | fn longest(x: &str) -> &str { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/bfLifetime.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 120 | struct Node<'a> { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 121 | name: &'a 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: fields `name` and `addr` are never read [INFO] [stdout] --> src/bfLifetime.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 137 | struct Node<'a, 'b> { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 138 | name: &'a String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 139 | addr: &'b 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: fields `name` and `addr` are never read [INFO] [stdout] --> src/bfLifetime.rs:163:9 [INFO] [stdout] | [INFO] [stdout] 162 | struct Node<'a, 'b, Name, Addr> { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 163 | name: &'a Name, [INFO] [stdout] | ^^^^ [INFO] [stdout] 164 | addr: &'b Addr, [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: function `go` is never used [INFO] [stdout] --> src/bfLifetime.rs:223:12 [INFO] [stdout] | [INFO] [stdout] 223 | fn go<'a>(curcur: &'a mut &'a mut Box) {} [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/bhSingleton.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 2 | pub struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 3 | pub x: u32, [INFO] [stdout] 4 | pub y: u32, [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] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/caModule.rs:23:28 [INFO] [stdout] | [INFO] [stdout] 22 | pub(crate) struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 23 | pub(crate) name: 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 `0` is never read [INFO] [stdout] --> src/caModule.rs:37:24 [INFO] [stdout] | [INFO] [stdout] 37 | pub struct int(pub i32); [INFO] [stdout] | --- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = note: `int` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [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] 37 | pub struct int(()); [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `int2` is never constructed [INFO] [stdout] --> src/caModule.rs:40:20 [INFO] [stdout] | [INFO] [stdout] 40 | pub struct int2(pub i32, i32); [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `int2` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `intPrivate` is never constructed [INFO] [stdout] --> src/caModule.rs:44:20 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct intPrivate(i32); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `intPrivate` 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 `haha` is never used [INFO] [stdout] --> src/caModule.rs:89:12 [INFO] [stdout] | [INFO] [stdout] 89 | fn haha() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `haha` is never used [INFO] [stdout] --> src/caModule.rs:94:27 [INFO] [stdout] | [INFO] [stdout] 94 | pub(crate) fn haha() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `haha` is never used [INFO] [stdout] --> src/caModule.rs:100:16 [INFO] [stdout] | [INFO] [stdout] 100 | fn haha() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `b` is never used [INFO] [stdout] --> src/ccTrait.rs:206:12 [INFO] [stdout] | [INFO] [stdout] 205 | trait B { [INFO] [stdout] | - method in this trait [INFO] [stdout] 206 | fn b(&self); [INFO] [stdout] | ^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Trait2` is never used [INFO] [stdout] --> src/ccTrait.rs:243:11 [INFO] [stdout] | [INFO] [stdout] 243 | trait Trait2 { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `name` is never read [INFO] [stdout] --> src/ceGeneric.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 36 | struct Node { [INFO] [stdout] | ---- field in this struct [INFO] [stdout] 37 | name: T, [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: enum `Option` is never used [INFO] [stdout] --> src/ceGeneric.rs:47:10 [INFO] [stdout] | [INFO] [stdout] 47 | enum Option { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Result` is never used [INFO] [stdout] --> src/ceGeneric.rs:51:10 [INFO] [stdout] | [INFO] [stdout] 51 | enum Result { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Graph` is never used [INFO] [stdout] --> src/ceGeneric.rs:154:19 [INFO] [stdout] | [INFO] [stdout] 154 | pub trait Graph { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `distance` is never used [INFO] [stdout] --> src/ceGeneric.rs:159:12 [INFO] [stdout] | [INFO] [stdout] 159 | fn distance>(graph: &G, start: &N, end: &N) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `has_edge` and `edges` are never used [INFO] [stdout] --> src/ceGeneric.rs:169:16 [INFO] [stdout] | [INFO] [stdout] 165 | pub(crate) trait Graph { [INFO] [stdout] | ----- methods in this trait [INFO] [stdout] ... [INFO] [stdout] 169 | fn has_edge(&self, start: &Self::N, end: &Self::N) -> bool; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 170 | fn edges(&self, node: &Self::N) -> Vec; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `distance` is never used [INFO] [stdout] --> src/ceGeneric.rs:173:12 [INFO] [stdout] | [INFO] [stdout] 173 | fn distance(graph: &G, start: &G::N, end: &G::N) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_assign` is never used [INFO] [stdout] --> src/clMacro.rs:172:9 [INFO] [stdout] | [INFO] [stdout] 172 | op!(add_assign, Add, +=, add); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `mul_assign` is never used [INFO] [stdout] --> src/clMacro.rs:173:9 [INFO] [stdout] | [INFO] [stdout] 173 | op!(mul_assign, Mul, *=, mul); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `sub_assign` is never used [INFO] [stdout] --> src/clMacro.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | op!(sub_assign, Sub, -=, sub); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this warning originates in the macro `op` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/mhVec.rs:97:11 [INFO] [stdout] | [INFO] [stdout] 97 | A(i32), [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] 97 | A(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/mhVec.rs:98:11 [INFO] [stdout] | [INFO] [stdout] 98 | B(f64), [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] 98 | B(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/mhVec.rs:99:11 [INFO] [stdout] | [INFO] [stdout] 99 | C(String), [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] 99 | C(()), [INFO] [stdout] | ~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `haha` is never used [INFO] [stdout] --> src/useFolder/mod.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | fn haha() { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/abPrint.rs:124:17 [INFO] [stdout] | [INFO] [stdout] 124 | write!(f, "["); [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] = note: this warning originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/abPrint.rs:130:25 [INFO] [stdout] | [INFO] [stdout] 130 | write!(f, ","); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: this warning originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/abPrint.rs:132:21 [INFO] [stdout] | [INFO] [stdout] 132 | write!(f, "{}", self.0[i]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stdout] = note: this warning originates in the macro `write` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `x` should have an upper case name [INFO] [stdout] --> src/aeArray.rs:12:11 [INFO] [stdout] | [INFO] [stdout] 12 | const x: i32 = 3; [INFO] [stdout] | ^ help: convert the identifier to upper case (notice the capitalization): `X` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_upper_case_globals)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused arithmetic operation that must be used [INFO] [stdout] --> src/aoExpression.rs:19:13 [INFO] [stdout] | [INFO] [stdout] 19 | 2 * x; [INFO] [stdout] | ^^^^^ the arithmetic operation produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 19 | let _ = 2 * x; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static variable `x` should have an upper case name [INFO] [stdout] --> src/bhSingleton.rs:75:20 [INFO] [stdout] | [INFO] [stdout] 75 | static mut x: i32 = 0; [INFO] [stdout] | ^ help: convert the identifier to upper case (notice the capitalization): `X` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: path statement with no effect [INFO] [stdout] --> src/ckClosure.rs:195:13 [INFO] [stdout] | [INFO] [stdout] 195 | s; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(path_statements)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused borrow that must be used [INFO] [stdout] --> src/ckClosure.rs:215:13 [INFO] [stdout] | [INFO] [stdout] 215 | &s; [INFO] [stdout] | ^^ the borrow produces a value [INFO] [stdout] | [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 215 | let _ = &s; [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `std::result::Result` that must be used [INFO] [stdout] --> src/mcFile.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | file.read_to_string(&mut content); [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] 27 | let _ = file.read_to_string(&mut content); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `n` should have an upper case name [INFO] [stdout] --> src/mhVec.rs:138:11 [INFO] [stdout] | [INFO] [stdout] 138 | const n: usize = 10; [INFO] [stdout] | ^ help: convert the identifier to upper case: `N` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 61 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "bc5e4494061b311552970c2e4407bd866107a0659a08b8372c71d16a1e99b924", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bc5e4494061b311552970c2e4407bd866107a0659a08b8372c71d16a1e99b924", kill_on_drop: false }` [INFO] [stdout] bc5e4494061b311552970c2e4407bd866107a0659a08b8372c71d16a1e99b924 [INFO] checking weiyinfu/learnRust against try#36dbcaee1a55543dfc181be52a69d99ff46ff62f for pr-122960-3 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fweiyinfu%2FlearnRust" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/weiyinfu/learnRust on toolchain 36dbcaee1a55543dfc181be52a69d99ff46ff62f [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/weiyinfu/learnRust [INFO] finished tweaking git repo https://github.com/weiyinfu/learnRust [INFO] tweaked toml for git repo https://github.com/weiyinfu/learnRust written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/weiyinfu/learnRust 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" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 9df5be4c771302c8dfaf1853b431b2d36a90dc8659ccdc569425f8a5290d6a38 [INFO] running `Command { std: "docker" "start" "-a" "9df5be4c771302c8dfaf1853b431b2d36a90dc8659ccdc569425f8a5290d6a38", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "9df5be4c771302c8dfaf1853b431b2d36a90dc8659ccdc569425f8a5290d6a38", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9df5be4c771302c8dfaf1853b431b2d36a90dc8659ccdc569425f8a5290d6a38", kill_on_drop: false }` [INFO] [stdout] 9df5be4c771302c8dfaf1853b431b2d36a90dc8659ccdc569425f8a5290d6a38 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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:2788e3201cd34a07e3172128adcd8b3090168a8e3bcc40d7c032b9dda1df7d1c" "/opt/rustwide/cargo-home/bin/cargo" "+36dbcaee1a55543dfc181be52a69d99ff46ff62f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] fe8371755a17f65681835911d717192e9f4e563372d4cafb62e1b6c7a988977b [INFO] running `Command { std: "docker" "start" "-a" "fe8371755a17f65681835911d717192e9f4e563372d4cafb62e1b6c7a988977b", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] skipping non-2021 edition `2018` [INFO] running `Command { std: "docker" "inspect" "fe8371755a17f65681835911d717192e9f4e563372d4cafb62e1b6c7a988977b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fe8371755a17f65681835911d717192e9f4e563372d4cafb62e1b6c7a988977b", kill_on_drop: false }` [INFO] [stdout] fe8371755a17f65681835911d717192e9f4e563372d4cafb62e1b6c7a988977b