[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] testing weiyinfu/learnRust against master#c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38 for pr-146098-7 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fweiyinfu%2FlearnRust" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [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-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/weiyinfu/learnRust on toolchain c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [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" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded itoa v0.4.5 [INFO] [stderr] Downloaded quote v1.0.4 [INFO] [stderr] Downloaded try-lock v0.2.2 [INFO] [stderr] Downloaded proc-macro2 v1.0.12 [INFO] [stderr] Downloaded serde_derive v1.0.106 [INFO] [stderr] Downloaded error-chain v0.10.0 [INFO] [stderr] Downloaded hermit-abi v0.1.10 [INFO] [stderr] Downloaded indexmap v1.3.2 [INFO] [stderr] Downloaded ryu v1.0.4 [INFO] [stderr] Downloaded num-integer v0.1.42 [INFO] [stderr] Downloaded backtrace v0.3.46 [INFO] [stderr] Downloaded hyper v0.13.5 [INFO] [stderr] Downloaded syn v1.0.18 [INFO] [stderr] Downloaded serde_json v1.0.52 [INFO] [stderr] Downloaded chrono v0.4.11 [INFO] [stderr] Downloaded futures-util v0.3.4 [INFO] [stderr] Downloaded h2 v0.2.4 [INFO] [stderr] Downloaded num-traits v0.2.11 [INFO] [stderr] Downloaded cc v1.0.50 [INFO] [stderr] Downloaded futures-channel v0.3.4 [INFO] [stderr] Downloaded pin-project v0.4.9 [INFO] [stderr] Downloaded tokio v0.2.20 [INFO] [stderr] Downloaded pin-project-internal v0.4.9 [INFO] [stderr] Downloaded futures-task v0.3.4 [INFO] [stderr] Downloaded backtrace-sys v0.1.35 [INFO] [stderr] Downloaded futures-core v0.3.4 [INFO] [stderr] Downloaded pin-project-lite v0.1.4 [INFO] [stderr] Downloaded ferris-says v0.1.2 [INFO] [stderr] Downloaded futures-sink v0.3.4 [INFO] [stderr] Downloaded serde v1.0.106 [INFO] [stderr] Downloaded smallvec v0.4.5 [INFO] [stderr] Downloaded bytes v0.5.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] c2ab2a0e399e8679ec4b85271dc4692413b4a057f2861cd328797ef805646721 [INFO] running `Command { std: "docker" "start" "-a" "c2ab2a0e399e8679ec4b85271dc4692413b4a057f2861cd328797ef805646721", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "c2ab2a0e399e8679ec4b85271dc4692413b4a057f2861cd328797ef805646721", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c2ab2a0e399e8679ec4b85271dc4692413b4a057f2861cd328797ef805646721", kill_on_drop: false }` [INFO] [stdout] c2ab2a0e399e8679ec4b85271dc4692413b4a057f2861cd328797ef805646721 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:4848fb76d95f26979359cc7e45710b1dbc8f3acb7aeedee7c460d7702230f228" "/opt/rustwide/cargo-home/bin/cargo" "+c90bcb9571b7aab0d8beaa2ce8a998ffaf079d38" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 69f1ae460959f677aafd9eb58ed0e78d73845762ffc21e7a6bcd555586675eb3 [INFO] running `Command { std: "docker" "start" "-a" "69f1ae460959f677aafd9eb58ed0e78d73845762ffc21e7a6bcd555586675eb3", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.69 [INFO] [stderr] Compiling autocfg v1.0.0 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Compiling proc-macro2 v1.0.12 [INFO] [stderr] Compiling bytes v0.5.4 [INFO] [stderr] Compiling fnv v1.0.6 [INFO] [stderr] Compiling syn v1.0.18 [INFO] [stderr] Compiling cc v1.0.50 [INFO] [stderr] Compiling futures-core v0.3.4 [INFO] [stderr] Compiling memchr v2.3.3 [INFO] [stderr] Compiling itoa v0.4.5 [INFO] [stderr] Compiling bitflags v1.2.1 [INFO] [stderr] Compiling pin-project-lite v0.1.4 [INFO] [stderr] Compiling unicode-width v0.1.7 [INFO] [stderr] Compiling futures-task v0.3.4 [INFO] [stderr] Compiling serde v1.0.106 [INFO] [stderr] Compiling httparse v1.3.4 [INFO] [stderr] Compiling rustc-demangle v0.1.16 [INFO] [stderr] Compiling futures-sink v0.3.4 [INFO] [stderr] Compiling ryu v1.0.4 [INFO] [stderr] Compiling futures-util v0.3.4 [INFO] [stderr] Compiling textwrap v0.11.0 [INFO] [stderr] Compiling http v0.2.1 [INFO] [stderr] Compiling try-lock v0.2.2 [INFO] [stderr] Compiling vec_map v0.8.1 [INFO] [stderr] Compiling futures-channel v0.3.4 [INFO] [stderr] Compiling want v0.3.0 [INFO] [stderr] Compiling smallvec v0.4.5 [INFO] [stderr] Compiling tower-service v0.3.0 [INFO] [stderr] Compiling indexmap v1.3.2 [INFO] [stderr] Compiling num-traits v0.2.11 [INFO] [stderr] Compiling num-integer v0.1.42 [INFO] [stderr] Compiling net2 v0.2.34 [INFO] [stderr] Compiling iovec v0.1.4 [INFO] [stderr] Compiling time v0.1.43 [INFO] [stderr] Compiling atty v0.2.14 [INFO] [stderr] Compiling rand v0.4.6 [INFO] [stderr] Compiling clap v2.33.0 [INFO] [stderr] Compiling backtrace-sys v0.1.35 [INFO] [stderr] Compiling mio v0.6.22 [INFO] [stderr] Compiling quote v1.0.4 [INFO] [stderr] Compiling rand v0.3.23 [INFO] [stderr] Compiling tokio v0.2.20 [INFO] [stderr] Compiling chrono v0.4.11 [INFO] [stderr] Compiling backtrace v0.3.46 [INFO] [stderr] Compiling error-chain v0.10.0 [INFO] [stderr] Compiling http-body v0.3.1 [INFO] [stderr] Compiling ferris-says v0.1.2 [INFO] [stderr] Compiling tokio-util v0.3.1 [INFO] [stderr] Compiling h2 v0.2.4 [INFO] [stderr] Compiling serde_json v1.0.52 [INFO] [stderr] Compiling pin-project-internal v0.4.9 [INFO] [stderr] Compiling serde_derive v1.0.106 [INFO] [stderr] Compiling pin-project v0.4.9 [INFO] [stderr] Compiling hyper v0.13.5 [INFO] [stderr] Compiling learnRust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/mkSerde.rs:6:10 [INFO] [stdout] | [INFO] [stdout] 6 | #[derive(Serialize, Deserialize, Debug)] [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Serialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition value: `cargo-clippy` [INFO] [stdout] --> src/mkSerde.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | #[derive(Serialize, Deserialize, Debug)] [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: no expected values for `feature` [INFO] [stdout] = note: using a cfg inside a derive macro will use the cfgs from the destination crate and not the ones from the defining crate [INFO] [stdout] = help: try referring to `Deserialize` crate for guidance on how handle this unexpected cfg [INFO] [stdout] = help: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [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: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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: struct `Node` is never constructed [INFO] [stdout] --> src/ciAnnotations.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | struct Node {} [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: struct `Point` is never constructed [INFO] [stdout] --> src/mkSerde.rs:7:8 [INFO] [stdout] | [INFO] [stdout] 7 | struct Point { [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: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/mkSerde.rs:6:10 [INFO] [stdout] | [INFO] [stdout] 6 | #[derive(Serialize, Deserialize, Debug)] [INFO] [stdout] | ^-------- [INFO] [stdout] | | [INFO] [stdout] | `Serialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_SERIALIZE_FOR_Point` [INFO] [stdout] 7 | struct Point { [INFO] [stdout] | ----- `Point` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Serialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Serialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [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: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info) [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/mkSerde.rs:6:21 [INFO] [stdout] | [INFO] [stdout] 6 | #[derive(Serialize, Deserialize, Debug)] [INFO] [stdout] | ^---------- [INFO] [stdout] | | [INFO] [stdout] | `Deserialize` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_IMPL_DESERIALIZE_FOR_Point` [INFO] [stdout] 7 | struct Point { [INFO] [stdout] | ----- `Point` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Deserialize` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Deserialize` may come from an old version of the `serde_derive` crate, try updating your dependency with `cargo update -p serde_derive` [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: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info) [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)]` (part of `#[warn(unused)]`) on by default [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] 10 | let mut a = [[0; n]; n]; [INFO] [stdout] | ----- `a` declared here, outside the closure [INFO] [stdout] ... [INFO] [stdout] 46 | go: &|g, x, y| { [INFO] [stdout] | --------- in this closure [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] 10 | let mut a = [[0; n]; n]; [INFO] [stdout] | ----- `a` declared here, outside the closure [INFO] [stdout] ... [INFO] [stdout] 46 | go: &|g, x, y| { [INFO] [stdout] | --------- in this closure [INFO] [stdout] ... [INFO] [stdout] 58 | a[x][y] = 0; [INFO] [stdout] | ^^^^^^^^^^^ cannot assign [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)]` (part of `#[warn(unused)]`) 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] 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] 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 3 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [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)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/bin/02-常量.rs:11:24 [INFO] [stdout] | [INFO] [stdout] 11 | println!("{}", Z); [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)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [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)]` (part of `#[warn(unused)]`) 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] running `Command { std: "docker" "inspect" "69f1ae460959f677aafd9eb58ed0e78d73845762ffc21e7a6bcd555586675eb3", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "69f1ae460959f677aafd9eb58ed0e78d73845762ffc21e7a6bcd555586675eb3", kill_on_drop: false }` [INFO] [stdout] 69f1ae460959f677aafd9eb58ed0e78d73845762ffc21e7a6bcd555586675eb3