[INFO] cloning repository https://github.com/lijiachang/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/lijiachang/learn_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flijiachang%2Flearn_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flijiachang%2Flearn_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b3efa83c43568a2c2f696bca9dee80b603245527 [INFO] checking lijiachang/learn_rust against try#29194e8f603400afdb2f86c9418e9fccb1628ea0 for pr-135331-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Flijiachang%2Flearn_rust" "/workspace/builds/worker-2-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/lijiachang/learn_rust [INFO] finished tweaking git repo https://github.com/lijiachang/learn_rust [INFO] tweaked toml for git repo https://github.com/lijiachang/learn_rust written to /workspace/builds/worker-2-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/lijiachang/learn_rust on toolchain 29194e8f603400afdb2f86c9418e9fccb1628ea0 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/lijiachang/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" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] adc89de37ca384ca41064304f640b1955c395d6c0d6681da99f961ec03453c6e [INFO] running `Command { std: "docker" "start" "-a" "adc89de37ca384ca41064304f640b1955c395d6c0d6681da99f961ec03453c6e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "adc89de37ca384ca41064304f640b1955c395d6c0d6681da99f961ec03453c6e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "adc89de37ca384ca41064304f640b1955c395d6c0d6681da99f961ec03453c6e", kill_on_drop: false }` [INFO] [stdout] adc89de37ca384ca41064304f640b1955c395d6c0d6681da99f961ec03453c6e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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:cf8efcab8866f2cf4285301c7418e2f4f2a9b088c91ba69c40d5b659f81557f7" "/opt/rustwide/cargo-home/bin/cargo" "+29194e8f603400afdb2f86c9418e9fccb1628ea0" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 61777c818a8aacc27b3b8b4736c3be5a1b0125358a773d4aad61ad5964b9bc0d [INFO] running `Command { std: "docker" "start" "-a" "61777c818a8aacc27b3b8b4736c3be5a1b0125358a773d4aad61ad5964b9bc0d", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.2.0 [INFO] [stderr] Compiling libc v0.2.152 [INFO] [stderr] Compiling proc-macro2 v1.0.81 [INFO] [stderr] Compiling unicode-ident v1.0.12 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking futures-core v0.3.30 [INFO] [stderr] Checking pin-project-lite v0.2.14 [INFO] [stderr] Checking futures-sink v0.3.30 [INFO] [stderr] Compiling parking_lot_core v0.9.9 [INFO] [stderr] Checking smallvec v1.13.2 [INFO] [stderr] Checking pin-utils v0.1.0 [INFO] [stderr] Checking memchr v2.7.2 [INFO] [stderr] Compiling serde v1.0.199 [INFO] [stderr] Checking futures-task v0.3.30 [INFO] [stderr] Checking futures-io v0.3.30 [INFO] [stderr] Checking scopeguard v1.2.0 [INFO] [stderr] Compiling rust_decimal v1.35.0 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking arrayvec v0.7.4 [INFO] [stderr] Checking bytes v1.6.0 [INFO] [stderr] Checking lazy_static v1.4.0 [INFO] [stderr] Checking log v0.4.21 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Compiling slab v0.4.9 [INFO] [stderr] Compiling lock_api v0.4.11 [INFO] [stderr] Compiling num-traits v0.2.18 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling syn v2.0.60 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Checking num_cpus v1.16.0 [INFO] [stderr] Checking mio v0.8.11 [INFO] [stderr] Checking signal-hook-registry v1.4.1 [INFO] [stderr] Checking socket2 v0.5.6 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling tokio-macros v2.2.0 [INFO] [stderr] Compiling async-stream-impl v0.3.5 [INFO] [stderr] Checking async-stream v0.3.5 [INFO] [stderr] Checking tokio v1.37.0 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking futures-executor v0.3.30 [INFO] [stderr] Checking futures v0.3.30 [INFO] [stderr] Checking learn_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected identifier, found keyword `fn` [INFO] [stdout] --> src/oop_2.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn fn main() { [INFO] [stdout] | ^^ expected identifier, found keyword [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected identifier, found keyword `fn` [INFO] [stdout] --> src/oop_2.rs:46:4 [INFO] [stdout] | [INFO] [stdout] 46 | fn fn main() { [INFO] [stdout] | ^^ expected identifier, found keyword [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: missing parameters for function definition [INFO] [stdout] --> src/oop_2.rs:46:6 [INFO] [stdout] | [INFO] [stdout] 46 | fn fn main() { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] help: add a parameter list [INFO] [stdout] | [INFO] [stdout] 46 | fn fn() main() { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `->`, `<`, `where`, or `{`, found `main` [INFO] [stdout] --> src/oop_2.rs:46:7 [INFO] [stdout] | [INFO] [stdout] 46 | fn fn main() { [INFO] [stdout] | ^^^^ expected one of `->`, `<`, `where`, or `{` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: missing parameters for function definition [INFO] [stdout] --> src/oop_2.rs:46:6 [INFO] [stdout] | [INFO] [stdout] 46 | fn fn main() { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] help: add a parameter list [INFO] [stdout] | [INFO] [stdout] 46 | fn fn() main() { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `->`, `<`, `where`, or `{`, found `main` [INFO] [stdout] --> src/oop_2.rs:46:7 [INFO] [stdout] | [INFO] [stdout] 46 | fn fn main() { [INFO] [stdout] | ^^^^ expected one of `->`, `<`, `where`, or `{` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::empty` [INFO] [stdout] --> src/vector_.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::io::empty; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::trait_::Summary` [INFO] [stdout] --> src/trait_as_arg.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::trait_::Summary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Error` [INFO] [stdout] --> src/adcanced_type.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | use std::io::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/adcanced_type.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `JoinError` [INFO] [stdout] --> src/async_tokio_joinSet.rs:1:28 [INFO] [stdout] | [INFO] [stdout] 1 | use tokio::task::{JoinSet, JoinError}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Weak` [INFO] [stdout] --> src/smart_points_2.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::rc::Weak; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `main` in module `decimal` [INFO] [stdout] --> src/main.rs:101:14 [INFO] [stdout] | [INFO] [stdout] 101 | decimal::main(); [INFO] [stdout] | ^^^^ not found in `decimal` [INFO] [stdout] | [INFO] [stdout] note: these functions exist but are inaccessible [INFO] [stdout] --> src/ownership_and_method.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `crate::ownership_and_method::main`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/async_tokio_select.rs:16:7 [INFO] [stdout] | [INFO] [stdout] 16 | async fn main() { [INFO] [stdout] | ^^^^^^^^^ `crate::async_tokio_select::main`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/file_loop.rs:125:1 [INFO] [stdout] | [INFO] [stdout] 125 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `crate::file_loop::main`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/if_let.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `crate::if_let::main`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/match_3.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `crate::match_3::main`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/advanced_trait.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `crate::advanced_trait::main`: not accessible [INFO] [stdout] | [INFO] [stdout] ::: src/ownership_and_return.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | fn main() { [INFO] [stdout] | ^^^^^^^^^ `crate::ownership_and_return::main`: not accessible [INFO] [stdout] help: consider importing one of these functions [INFO] [stdout] | [INFO] [stdout] 1 + use crate::advanced_fn_and_closure::main; [INFO] [stdout] | [INFO] [stdout] 1 + use crate::async_1::main; [INFO] [stdout] | [INFO] [stdout] 1 + use crate::closure::main; [INFO] [stdout] | [INFO] [stdout] 1 + use crate::enum_option::main; [INFO] [stdout] | [INFO] [stdout] = and 27 other candidates [INFO] [stdout] help: if you import `main`, refer to it directly [INFO] [stdout] | [INFO] [stdout] 101 - decimal::main(); [INFO] [stdout] 101 + main(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::empty` [INFO] [stdout] --> src/vector_.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::io::empty; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::trait_::Summary` [INFO] [stdout] --> src/trait_as_arg.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::trait_::Summary; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Error` [INFO] [stdout] --> src/adcanced_type.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | use std::io::Error; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::fmt` [INFO] [stdout] --> src/adcanced_type.rs:31:5 [INFO] [stdout] | [INFO] [stdout] 31 | use std::fmt; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `tokio::sync::broadcast` [INFO] [stdout] --> src/async_tokio_broadcast.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use tokio::sync::broadcast; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Duration` and `sleep` [INFO] [stdout] --> src/async_tokio_broadcast.rs:17:19 [INFO] [stdout] | [INFO] [stdout] 17 | use tokio::time::{sleep, Duration}; [INFO] [stdout] | ^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `JoinError` and `JoinSet` [INFO] [stdout] --> src/async_tokio_joinSet.rs:1:19 [INFO] [stdout] | [INFO] [stdout] 1 | use tokio::task::{JoinSet, JoinError}; [INFO] [stdout] | ^^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Duration` and `sleep` [INFO] [stdout] --> src/async_tokio_joinSet.rs:2:19 [INFO] [stdout] | [INFO] [stdout] 2 | use tokio::time::{sleep, Duration}; [INFO] [stdout] | ^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `async_stream::stream` [INFO] [stdout] --> src/async_stream_yield.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | use async_stream::stream; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `futures::StreamExt` [INFO] [stdout] --> src/async_stream_yield.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | use futures::StreamExt; // 引入 StreamExt trait 来使用 next 方法 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `pin_utils::pin_mut` [INFO] [stdout] --> src/async_stream_yield.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | use pin_utils::pin_mut; // 引入 pin_mut 宏 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Duration` and `self` [INFO] [stdout] --> src/async_stream_yield.rs:18:19 [INFO] [stdout] | [INFO] [stdout] 18 | use tokio::time::{self, Duration}; [INFO] [stdout] | ^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_decimal::prelude::*` [INFO] [stdout] --> src/decimal.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use rust_decimal::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `rust_decimal::Decimal` [INFO] [stdout] --> src/decimal.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use rust_decimal::Decimal; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/closure_2.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> src/smart_points_2.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Weak` [INFO] [stdout] --> src/smart_points_2.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::rc::Weak; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::any::Any` [INFO] [stdout] --> src/trait_polymorphism.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::any::Any; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::f32::consts::PI` [INFO] [stdout] --> src/trait_polymorphism.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::f32::consts::PI; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::collections::HashMap` [INFO] [stdout] --> src/arc_mutex.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::collections::HashMap; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `Arc` and `Mutex` [INFO] [stdout] --> src/arc_mutex.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | use std::sync::{Arc, Mutex}; [INFO] [stdout] | ^^^ ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread` [INFO] [stdout] --> src/arc_mutex.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::thread; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/string.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/ownership_and_return.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let s1 = gives_ownership(); // 把字符串移动给了s1 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/ownership_and_return.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let s3 = takes_and_gives_back(s2); // 然后移动到函数里面 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/slice.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let mut s = String::from("hello world"); [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: variable does not need to be mutable [INFO] [stdout] --> src/struct_.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let mut user2 = User { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/tuple_struct.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> src/tuple_struct.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let origin = Point(0, 0, 0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/enum_option.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let some_number = Some(5); //Some表示有值 [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/enum_option.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let some_string = Some("A String"); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/enum_option.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let absent_number: Option = None; //可能为空,没有一个有效的值 [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/match_3.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/match_3.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/vector_.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/string_2.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let s = data.to_string(); // 转换为字符串 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/string_2.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let s = String::from("init contents"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let f= File::open("hello.txt").unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let f = File::open("hello.txt").expect("无法打开文件"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let f = File::open("h.txt")?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list` [INFO] [stdout] --> src/smart_points.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let list = Cons(1, Box::new(Cons(2, Box::new(Cons(3, Box::new(Nil)))))); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_list` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/smart_points_rc.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let b = Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/smart_points_rc.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handle` [INFO] [stdout] --> src/thread.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let handle = thread::spawn(move || { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_of_numbers` [INFO] [stdout] --> src/advanced_fn_and_closure.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let list_of_numbers = vec![1, 2, 3]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_of_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_of_string` [INFO] [stdout] --> src/advanced_fn_and_closure.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let list_of_string: Vec = list_of_string.iter().map(ToString::to_string).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_of_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_of_statuses` [INFO] [stdout] --> src/advanced_fn_and_closure.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let list_of_statuses: Vec = (0u32..20).map(Status::Value).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_of_statuses` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/string.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/ownership_and_return.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let s1 = gives_ownership(); // 把字符串移动给了s1 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s3` [INFO] [stdout] --> src/ownership_and_return.rs:10:9 [INFO] [stdout] | [INFO] [stdout] 10 | let s3 = takes_and_gives_back(s2); // 然后移动到函数里面 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/slice.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let mut s = String::from("hello world"); [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: variable does not need to be mutable [INFO] [stdout] --> src/struct_.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let mut user2 = User { [INFO] [stdout] | ----^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `black` [INFO] [stdout] --> src/tuple_struct.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let black = Color(0, 0, 0); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_black` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `origin` [INFO] [stdout] --> src/tuple_struct.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let origin = Point(0, 0, 0); [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_origin` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_number` [INFO] [stdout] --> src/enum_option.rs:12:9 [INFO] [stdout] | [INFO] [stdout] 12 | let some_number = Some(5); //Some表示有值 [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `some_string` [INFO] [stdout] --> src/enum_option.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | let some_string = Some("A String"); [INFO] [stdout] | ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_some_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `absent_number` [INFO] [stdout] --> src/enum_option.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let absent_number: Option = None; //可能为空,没有一个有效的值 [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_absent_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `six` [INFO] [stdout] --> src/match_3.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let six = plus_one(five); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_six` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `none` [INFO] [stdout] --> src/match_3.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let none = plus_one(None); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_none` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `row` [INFO] [stdout] --> src/vector_.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | let row = vec![ [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_row` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/string_2.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | let s = data.to_string(); // 转换为字符串 [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/string_2.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let s = String::from("init contents"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let f = match f { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 30 | let f= File::open("hello.txt").unwrap(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let f = File::open("hello.txt").expect("无法打开文件"); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/panic_.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let f = File::open("h.txt")?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/iterator.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | let mut v1_iter = v1.iter(); [INFO] [stdout] | ----^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list` [INFO] [stdout] --> src/smart_points.rs:51:9 [INFO] [stdout] | [INFO] [stdout] 51 | let list = Cons(1, Box::new(Cons(2, Box::new(Cons(3, Box::new(Nil)))))); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_list` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `learn_rust` (bin "learn_rust") due to 4 previous errors; 48 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/smart_points_rc.rs:33:9 [INFO] [stdout] | [INFO] [stdout] 33 | let b = Cons(3, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `c` [INFO] [stdout] --> src/smart_points_rc.rs:37:13 [INFO] [stdout] | [INFO] [stdout] 37 | let c = Cons(4, Rc::clone(&a)); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_c` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handle` [INFO] [stdout] --> src/thread.rs:25:9 [INFO] [stdout] | [INFO] [stdout] 25 | let handle = thread::spawn(move || { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_handle` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_of_numbers` [INFO] [stdout] --> src/advanced_fn_and_closure.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | let list_of_numbers = vec![1, 2, 3]; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_of_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_of_string` [INFO] [stdout] --> src/advanced_fn_and_closure.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | let list_of_string: Vec = list_of_string.iter().map(ToString::to_string).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_of_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `list_of_statuses` [INFO] [stdout] --> src/advanced_fn_and_closure.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let list_of_statuses: Vec = (0u32..20).map(Status::Value).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_list_of_statuses` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `num` [INFO] [stdout] --> src/closure_2.rs:65:41 [INFO] [stdout] | [INFO] [stdout] 65 | let mut add_num = move |x: i32| num += x; [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: did you mean to capture by reference instead? [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `learn_rust` (bin "learn_rust" test) due to 3 previous errors; 34 warnings emitted [INFO] running `Command { std: "docker" "inspect" "61777c818a8aacc27b3b8b4736c3be5a1b0125358a773d4aad61ad5964b9bc0d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "61777c818a8aacc27b3b8b4736c3be5a1b0125358a773d4aad61ad5964b9bc0d", kill_on_drop: false }` [INFO] [stdout] 61777c818a8aacc27b3b8b4736c3be5a1b0125358a773d4aad61ad5964b9bc0d