[INFO] cloning repository https://github.com/hongweipeng/learn_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/hongweipeng/learn_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhongweipeng%2Flearn_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhongweipeng%2Flearn_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] a1812d5590980e026925b7461faa5ffaf3a13539 [INFO] checking hongweipeng/learn_rust against master#18a6d911caba59605eb03db1452848a85d2e5879 for pr-112743 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fhongweipeng%2Flearn_rust" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/hongweipeng/learn_rust on toolchain 18a6d911caba59605eb03db1452848a85d2e5879 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+18a6d911caba59605eb03db1452848a85d2e5879" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] removed /workspace/builds/worker-4-tc1/source/rust-toolchain.toml [INFO] started tweaking git repo https://github.com/hongweipeng/learn_rust [INFO] finished tweaking git repo https://github.com/hongweipeng/learn_rust [INFO] tweaked toml for git repo https://github.com/hongweipeng/learn_rust written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/hongweipeng/learn_rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+18a6d911caba59605eb03db1452848a85d2e5879" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded uuid-macro-internal v1.3.3 [INFO] [stderr] Downloaded chrono-tz v0.8.2 [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:19e73879b68f455e41552ea35293514db52ea292d993f571636dbffedb77a1ee" "/opt/rustwide/cargo-home/bin/cargo" "+18a6d911caba59605eb03db1452848a85d2e5879" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1b2a0912db5cda846f0b2dfa8c28e18a4e3eb57163d36ab38e6655945882f3b1 [INFO] running `Command { std: "docker" "start" "-a" "1b2a0912db5cda846f0b2dfa8c28e18a4e3eb57163d36ab38e6655945882f3b1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1b2a0912db5cda846f0b2dfa8c28e18a4e3eb57163d36ab38e6655945882f3b1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1b2a0912db5cda846f0b2dfa8c28e18a4e3eb57163d36ab38e6655945882f3b1", kill_on_drop: false }` [INFO] [stdout] 1b2a0912db5cda846f0b2dfa8c28e18a4e3eb57163d36ab38e6655945882f3b1 [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:19e73879b68f455e41552ea35293514db52ea292d993f571636dbffedb77a1ee" "/opt/rustwide/cargo-home/bin/cargo" "+18a6d911caba59605eb03db1452848a85d2e5879" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6d95e7bcf8b3da78acb11250e3a0b2e8c1b0f6114c36cfd4f7e1fe3ee855a5fc [INFO] running `Command { std: "docker" "start" "-a" "6d95e7bcf8b3da78acb11250e3a0b2e8c1b0f6114c36cfd4f7e1fe3ee855a5fc", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.59 [INFO] [stderr] Compiling quote v1.0.28 [INFO] [stderr] Compiling unicode-ident v1.0.9 [INFO] [stderr] Compiling libc v0.2.144 [INFO] [stderr] Compiling serde v1.0.163 [INFO] [stderr] Compiling indexmap v1.9.3 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling lock_api v0.4.10 [INFO] [stderr] Compiling anyhow v1.0.71 [INFO] [stderr] Compiling parking_lot_core v0.9.8 [INFO] [stderr] Checking once_cell v1.17.2 [INFO] [stderr] Checking smallvec v1.10.0 [INFO] [stderr] Compiling cc v1.0.79 [INFO] [stderr] Compiling pkg-config v0.3.27 [INFO] [stderr] Checking bytes v1.4.0 [INFO] [stderr] Checking pin-project-lite v0.2.9 [INFO] [stderr] Checking itoa v1.0.6 [INFO] [stderr] Compiling regex-syntax v0.7.2 [INFO] [stderr] Compiling log v0.4.18 [INFO] [stderr] Compiling futures-core v0.3.28 [INFO] [stderr] Compiling either v1.8.1 [INFO] [stderr] Compiling memchr v2.5.0 [INFO] [stderr] Compiling tokio v1.28.2 [INFO] [stderr] Compiling siphasher v0.3.10 [INFO] [stderr] Compiling num-traits v0.2.15 [INFO] [stderr] Compiling slab v0.4.8 [INFO] [stderr] Compiling itertools v0.10.5 [INFO] [stderr] Checking hashbrown v0.12.3 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling phf_shared v0.11.1 [INFO] [stderr] Compiling io-lifetimes v1.0.11 [INFO] [stderr] Compiling crossbeam-utils v0.8.15 [INFO] [stderr] Compiling futures-task v0.3.28 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Checking tracing-core v0.1.31 [INFO] [stderr] Compiling openssl v0.10.54 [INFO] [stderr] Compiling rustix v0.37.19 [INFO] [stderr] Compiling futures-util v0.3.28 [INFO] [stderr] Compiling syn v2.0.18 [INFO] [stderr] Checking tracing v0.1.37 [INFO] [stderr] Checking signal-hook-registry v1.4.1 [INFO] [stderr] Checking mio v0.8.8 [INFO] [stderr] Compiling openssl-sys v0.9.88 [INFO] [stderr] Checking socket2 v0.4.9 [INFO] [stderr] Checking num_cpus v1.15.0 [INFO] [stderr] Checking http v0.2.9 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Compiling phf_generator v0.11.1 [INFO] [stderr] Compiling memoffset v0.8.0 [INFO] [stderr] Compiling futures-channel v0.3.28 [INFO] [stderr] Compiling thiserror v1.0.40 [INFO] [stderr] Compiling linux-raw-sys v0.3.8 [INFO] [stderr] Checking ryu v1.0.13 [INFO] [stderr] Checking futures-io v0.3.28 [INFO] [stderr] Checking tinyvec_macros v0.1.1 [INFO] [stderr] Checking futures-sink v0.3.28 [INFO] [stderr] Compiling native-tls v0.2.11 [INFO] [stderr] Compiling prettyplease v0.1.25 [INFO] [stderr] Compiling httparse v1.8.0 [INFO] [stderr] Compiling regex v1.8.3 [INFO] [stderr] Checking tinyvec v1.6.0 [INFO] [stderr] Compiling phf_codegen v0.11.1 [INFO] [stderr] Checking getrandom v0.2.9 [INFO] [stderr] Checking time v0.1.45 [INFO] [stderr] Compiling phf v0.11.1 [INFO] [stderr] Compiling crossbeam-epoch v0.9.14 [INFO] [stderr] Compiling serde_json v1.0.96 [INFO] [stderr] Compiling fastrand v1.9.0 [INFO] [stderr] Compiling fixedbitset v0.4.2 [INFO] [stderr] Checking percent-encoding v2.3.0 [INFO] [stderr] Checking try-lock v0.2.4 [INFO] [stderr] Checking form_urlencoded v1.2.0 [INFO] [stderr] Compiling petgraph v0.6.3 [INFO] [stderr] Checking http-body v0.4.5 [INFO] [stderr] Compiling which v4.4.0 [INFO] [stderr] Checking destructure_traitobject v0.2.0 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Compiling gcc v0.3.55 [INFO] [stderr] Compiling parse-zoneinfo v0.3.0 [INFO] [stderr] Checking tower-service v0.3.2 [INFO] [stderr] Compiling heck v0.4.1 [INFO] [stderr] Compiling crossbeam-queue v0.3.8 [INFO] [stderr] Checking unicode-bidi v0.3.13 [INFO] [stderr] Checking linked-hash-map v0.5.6 [INFO] [stderr] Compiling multimap v0.8.3 [INFO] [stderr] Checking unicode-normalization v0.1.22 [INFO] [stderr] Checking iana-time-zone v0.1.56 [INFO] [stderr] Checking yaml-rust v0.4.5 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking chrono v0.4.26 [INFO] [stderr] Compiling chrono-tz-build v0.1.0 [INFO] [stderr] Checking unsafe-any-ors v1.0.0 [INFO] [stderr] Checking ordered-float v2.10.0 [INFO] [stderr] Checking rand v0.4.6 [INFO] [stderr] Compiling protobuf v3.2.0 [INFO] [stderr] Checking miniz_oxide v0.7.1 [INFO] [stderr] Compiling rust-crypto v0.2.36 [INFO] [stderr] Checking crossbeam-deque v0.8.3 [INFO] [stderr] Checking typemap-ors v1.0.0 [INFO] [stderr] Compiling chrono-tz v0.8.2 [INFO] [stderr] Checking crossbeam-channel v0.5.8 [INFO] [stderr] Checking thread-id v4.1.0 [INFO] [stderr] Checking aho-corasick v1.0.1 [INFO] [stderr] Checking idna v0.4.0 [INFO] [stderr] Checking encoding_rs v0.8.32 [INFO] [stderr] Checking ipnet v2.7.2 [INFO] [stderr] Checking rustc-serialize v0.3.24 [INFO] [stderr] Checking rand v0.3.23 [INFO] [stderr] Checking arc-swap v1.6.0 [INFO] [stderr] Checking base64 v0.21.2 [INFO] [stderr] Checking humantime v2.1.0 [INFO] [stderr] Checking mime v0.3.17 [INFO] [stderr] Checking crossbeam v0.8.2 [INFO] [stderr] Checking flate2 v1.0.26 [INFO] [stderr] Compiling tempfile v3.5.0 [INFO] [stderr] Checking url v2.4.0 [INFO] [stderr] Compiling serde_derive v1.0.163 [INFO] [stderr] Compiling tokio-macros v2.1.0 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling thiserror-impl v1.0.40 [INFO] [stderr] Compiling uuid-macro-internal v1.3.3 [INFO] [stderr] Checking uuid v1.3.3 [INFO] [stderr] Compiling prost-derive v0.11.9 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Checking protobuf-support v3.2.0 [INFO] [stderr] Compiling prost v0.11.9 [INFO] [stderr] Compiling prost-types v0.11.9 [INFO] [stderr] Compiling prost-build v0.11.9 [INFO] [stderr] Checking tokio-util v0.7.8 [INFO] [stderr] Checking h2 v0.3.19 [INFO] [stderr] Compiling learn_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking serde_urlencoded v0.7.1 [INFO] [stderr] Checking serde_yaml v0.8.26 [INFO] [stderr] Checking serde-value v0.7.0 [INFO] [stderr] Checking want v0.3.0 [INFO] [stderr] Checking tokio-native-tls v0.3.1 [INFO] [stderr] Checking log4rs v1.2.0 [INFO] [stderr] Checking hyper v0.14.26 [INFO] [stderr] Checking hyper-tls v0.5.0 [INFO] [stderr] Checking reqwest v0.11.18 [INFO] [stdout] warning: unused import: `PageUnload` [INFO] [stdout] --> tests/test_custom_struct.rs:163:20 [INFO] [stdout] | [INFO] [stdout] 163 | use WebEvent::{PageUnload, PageLoad}; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::error::Error` [INFO] [stdout] --> tests/test_http_client.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::error::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pressed` [INFO] [stdout] --> tests/test_custom_struct.rs:157:9 [INFO] [stdout] | [INFO] [stdout] 157 | let pressed = WebOperations::KeyPress('x'); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pressed` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `pressed` [INFO] [stdout] --> tests/test_custom_struct.rs:164:9 [INFO] [stdout] | [INFO] [stdout] 164 | let pressed = PageLoad; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_pressed` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> tests/test_option_match.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | let c = b; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `bytes` [INFO] [stdout] --> tests/test_prost.rs:24:7 [INFO] [stdout] | [INFO] [stdout] 24 | let bytes = person.encode_to_vec(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_bytes` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `red`, `green`, and `blue` are never read [INFO] [stdout] --> tests/test_str_format.rs:68:9 [INFO] [stdout] | [INFO] [stdout] 67 | struct Color { [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 68 | red: u8, [INFO] [stdout] | ^^^ [INFO] [stdout] 69 | green: u8, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 70 | blue: u8, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Color` 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: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused label [INFO] [stdout] --> tests/test_control_flow.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | 'inner: loop { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `inferred_type` is assigned to, but never used [INFO] [stdout] --> tests/test_var_declare.rs:12:13 [INFO] [stdout] | [INFO] [stdout] 12 | let mut inferred_type = 12; // 根据下一行的赋值推断为 i64 类型 [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_inferred_type` instead [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `inferred_type` is never read [INFO] [stdout] --> tests/test_var_declare.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | inferred_type = 4294967296i64; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `logical` [INFO] [stdout] --> tests/test_var_declare.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let logical: bool = true; [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_logical` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `an_integer` [INFO] [stdout] --> tests/test_var_declare.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let an_integer = 5i32; // 后缀说明 [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_an_integer` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mutable` is assigned to, but never used [INFO] [stdout] --> tests/test_var_declare.rs:22:13 [INFO] [stdout] | [INFO] [stdout] 22 | let mut mutable = 12; // Mutable `i32` [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: consider using `_mutable` instead [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `mutable` is never read [INFO] [stdout] --> tests/test_var_declare.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | mutable = 21; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `arr` [INFO] [stdout] --> tests/test_var_declare.rs:53:9 [INFO] [stdout] | [INFO] [stdout] 53 | let arr = [3, 3, 3, 3]; [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_arr` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add_to_waitlist` is never used [INFO] [stdout] --> tests/test_package_crate_module.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | fn add_to_waitlist() {} [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `seat_at_table` is never used [INFO] [stdout] --> tests/test_package_crate_module.rs:44:12 [INFO] [stdout] | [INFO] [stdout] 44 | fn seat_at_table() {} [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_order` is never used [INFO] [stdout] --> tests/test_package_crate_module.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 48 | fn take_order() {} [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `serve_order` is never used [INFO] [stdout] --> tests/test_package_crate_module.rs:50:12 [INFO] [stdout] | [INFO] [stdout] 50 | fn serve_order() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `take_payment` is never used [INFO] [stdout] --> tests/test_package_crate_module.rs:52:12 [INFO] [stdout] | [INFO] [stdout] 52 | fn take_payment() {} [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NUM` is never used [INFO] [stdout] --> tests/test_var_declare.rs:42:11 [INFO] [stdout] | [INFO] [stdout] 42 | const NUM : i32 = 5; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `NUM` is never used [INFO] [stdout] --> tests/test_var_declare.rs:63:12 [INFO] [stdout] | [INFO] [stdout] 63 | static NUM: i32 = 100; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable statement [INFO] [stdout] --> tests/test_control_flow.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 73 | break 'outer; // 退出 'outer 的循环 [INFO] [stdout] | ------------ any code following this expression is unreachable [INFO] [stdout] 74 | } [INFO] [stdout] 75 | count = 4; // 这行不会执行 [INFO] [stdout] | ^^^^^^^^^^ unreachable statement [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ptr::eq` [INFO] [stdout] --> tests/test_builtin_data_type.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::ptr::eq; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 9 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ops::Index` [INFO] [stdout] --> tests/test_ownership.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::ops::Index; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> tests/test_control_flow.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | let mut count = 0; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> tests/test_control_flow.rs:70:13 [INFO] [stdout] | [INFO] [stdout] 70 | count = 2; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `count` is never read [INFO] [stdout] --> tests/test_control_flow.rs:75:13 [INFO] [stdout] | [INFO] [stdout] 75 | count = 4; // 这行不会执行 [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> tests/test_builtin_data_type.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let num = 18; // 会默认使用 i32 类型 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> tests/test_builtin_data_type.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | let num : i64 = 18; // 指定具体类型 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> tests/test_builtin_data_type.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let num = 18i64; // 除了 byte 类型外,所有字面值都允许使用类型后缀 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> tests/test_builtin_data_type.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let num = 0xff; // 0x 前缀十六进制 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> tests/test_builtin_data_type.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let num = 0o77; // 0o 前缀八进制 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> tests/test_builtin_data_type.rs:64:9 [INFO] [stdout] | [INFO] [stdout] 64 | let num = 0b1111_0000; // 0b 二进制 [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_num` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `byte` [INFO] [stdout] --> tests/test_builtin_data_type.rs:65:9 [INFO] [stdout] | [INFO] [stdout] 65 | let byte = b'A'; // 字节,只能声明为 u8 类型 [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_byte` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 5 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `money` [INFO] [stdout] --> tests/test_builtin_data_type.rs:114:9 [INFO] [stdout] | [INFO] [stdout] 114 | let money = 2.0; // 默认使用 f64 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_money` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> tests/test_builtin_data_type.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | let ch = 'z'; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> tests/test_builtin_data_type.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | let ch : char = '中'; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> tests/test_builtin_data_type.rs:148:9 [INFO] [stdout] | [INFO] [stdout] 148 | let ch : char = '\0'; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> tests/test_builtin_data_type.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | let ch : char = '\n'; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> tests/test_builtin_data_type.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | let ch : char = '😊'; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `empty` [INFO] [stdout] --> tests/test_builtin_data_type.rs:160:9 [INFO] [stdout] | [INFO] [stdout] 160 | let empty = (); // 空元组 [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_empty` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `tup` [INFO] [stdout] --> tests/test_builtin_data_type.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | let tup = (500, 6.4, true); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_tup` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `too_long_tuple` [INFO] [stdout] --> tests/test_builtin_data_type.rs:187:9 [INFO] [stdout] | [INFO] [stdout] 187 | let too_long_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_too_long_tuple` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> tests/test_builtin_data_type.rs:203:9 [INFO] [stdout] | [INFO] [stdout] 203 | let a = [3; 5]; // 等价于 let a = [3, 3, 3, 3, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> tests/test_ownership.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | let mut s = String::from("hello"); [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: 18 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 25.46s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: rustc-serialize v0.3.24 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1` [INFO] running `Command { std: "docker" "inspect" "6d95e7bcf8b3da78acb11250e3a0b2e8c1b0f6114c36cfd4f7e1fe3ee855a5fc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6d95e7bcf8b3da78acb11250e3a0b2e8c1b0f6114c36cfd4f7e1fe3ee855a5fc", kill_on_drop: false }` [INFO] [stdout] 6d95e7bcf8b3da78acb11250e3a0b2e8c1b0f6114c36cfd4f7e1fe3ee855a5fc