[INFO] fetching crate gw-rust-programming-tutorial 0.1.0... [INFO] testing gw-rust-programming-tutorial-0.1.0 against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] extracting crate gw-rust-programming-tutorial 0.1.0 into /workspace/builds/worker-5-tc1/source [INFO] started tweaking crates.io crate gw-rust-programming-tutorial 0.1.0 [INFO] finished tweaking crates.io crate gw-rust-programming-tutorial 0.1.0 [INFO] tweaked toml for crates.io crate gw-rust-programming-tutorial 0.1.0 written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate gw-rust-programming-tutorial 0.1.0 on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate gw-rust-programming-tutorial 0.1.0 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" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded stdext v0.3.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 546b6e66863abce7a0b89b2af3b46fd427be06653bcdbecf91935bbbc9a90855 [INFO] running `Command { std: "docker" "start" "-a" "546b6e66863abce7a0b89b2af3b46fd427be06653bcdbecf91935bbbc9a90855", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "546b6e66863abce7a0b89b2af3b46fd427be06653bcdbecf91935bbbc9a90855", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "546b6e66863abce7a0b89b2af3b46fd427be06653bcdbecf91935bbbc9a90855", kill_on_drop: false }` [INFO] [stdout] 546b6e66863abce7a0b89b2af3b46fd427be06653bcdbecf91935bbbc9a90855 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2f9743e50ab7b8bd21c9e9392df7fbf4db36776047a533f8471e774d3b675781 [INFO] running `Command { std: "docker" "start" "-a" "2f9743e50ab7b8bd21c9e9392df7fbf4db36776047a533f8471e774d3b675781", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.152 [INFO] [stderr] Compiling memchr v2.7.1 [INFO] [stderr] Compiling gimli v0.28.1 [INFO] [stderr] Compiling rustc-demangle v0.1.23 [INFO] [stderr] Compiling stdext v0.3.1 [INFO] [stderr] Compiling miniz_oxide v0.7.1 [INFO] [stderr] Compiling object v0.32.2 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Compiling backtrace v0.3.69 [INFO] [stderr] Compiling addr2line v0.21.0 [INFO] [stderr] Compiling gw-rust-programming-tutorial v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter_8/test_collection.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter_8/test_collection.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter_8/test_string.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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/chapter_8/test_string.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | 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/chapter_8/test_string.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let hello = String::from("السلام عليكم"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let hello = String::from("Dobrý den"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let hello = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let hello = String::from("שָׁלוֹם"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let hello = String::from("नमस्ते"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let hello = String::from("こんにちは"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let hello = String::from("안녕하세요"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let hello = String::from("你好"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let hello = String::from("Olá"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let hello = String::from("Здравствуйте"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let hello = String::from("Hola"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chapter_8/test_string.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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: unused variable: `s3` [INFO] [stdout] --> src/chapter_8/test_string.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let s3 = s1 + &s2; // 注意 s1 被移动了,不能继续使用 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/chapter_9/test_panic.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | 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: `it1` [INFO] [stdout] --> src/chapter_13/file_iterator.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let it1 = v1.iter_mut(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `it1` [INFO] [stdout] --> src/chapter_13/file_iterator.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let it1 = v1.into_iter(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | Int(i32), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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] 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] 36 - Int(i32), [INFO] [stdout] 36 + Int(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:37:15 [INFO] [stdout] | [INFO] [stdout] 37 | Float(f64), [INFO] [stdout] | ----- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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 - Float(f64), [INFO] [stdout] 37 + Float(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | Text(String), [INFO] [stdout] | ---- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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] 38 - Text(String), [INFO] [stdout] 38 + Text(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/chapter_10/test_traits.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chapter_10/test_traits.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 56 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 57 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/chapter_10/test_traits.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 65 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 66 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/lib.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | test_panic::read_username_from_file(); [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)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 29 | let _ = test_panic::read_username_from_file(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mapCus` should have a snake case name [INFO] [stdout] --> src/chapter_8/test_map.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut mapCus:HashMap=HashMap::new(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `map_cus` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/chapter_12/test_12_6.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | parse_env(); [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] 6 | let _ = parse_env(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fnum` [INFO] [stdout] --> src/main.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let fnum: f32 = 3.0; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_fnum` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> src/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let ch: char = 'a'; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/main.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | let (x, y, z) = tu1; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/main.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | let s1 = gives_ownership(); // gives_ownership 将返回值 [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/main.rs:222:9 [INFO] [stdout] | [INFO] [stdout] 222 | let s3 = takes_and_gives_back(s2); // s2 被移动到 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `username`, `email`, and `sign_in_count` are never read [INFO] [stdout] --> src/main.rs:279:5 [INFO] [stdout] | [INFO] [stdout] 277 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 278 | active: bool, [INFO] [stdout] 279 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 280 | email: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 281 | sign_in_count: u64, [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] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/main.rs:322:14 [INFO] [stdout] | [INFO] [stdout] 322 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] = note: `Color` 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 `0`, `1`, and `2` are never read [INFO] [stdout] --> src/main.rs:324:14 [INFO] [stdout] | [INFO] [stdout] 324 | struct Point(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [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 `0` is never read [INFO] [stdout] --> src/main.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | Ooo(Option), [INFO] [stdout] | --- ^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Message` 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] 366 - Ooo(Option), [INFO] [stdout] 366 + Ooo(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, `Write`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/main.rs:362:5 [INFO] [stdout] | [INFO] [stdout] 361 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 362 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 363 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 364 | Write(String), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 365 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Message` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Nickel`, `Dime`, and `Quarter` are never constructed [INFO] [stdout] --> src/main.rs:383:5 [INFO] [stdout] | [INFO] [stdout] 381 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 382 | Penny, [INFO] [stdout] 383 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 384 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] 385 | Quarter, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_optionT_match` should have a snake case name [INFO] [stdout] --> src/main.rs:407:4 [INFO] [stdout] | [INFO] [stdout] 407 | fn test_optionT_match() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_option_t_match` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.89s [INFO] running `Command { std: "docker" "inspect" "2f9743e50ab7b8bd21c9e9392df7fbf4db36776047a533f8471e774d3b675781", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2f9743e50ab7b8bd21c9e9392df7fbf4db36776047a533f8471e774d3b675781", kill_on_drop: false }` [INFO] [stdout] 2f9743e50ab7b8bd21c9e9392df7fbf4db36776047a533f8471e774d3b675781 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e371101ae18be93ad9a754d43361bc388e9453456dfb7064ca886e5ed0018738 [INFO] running `Command { std: "docker" "start" "-a" "e371101ae18be93ad9a754d43361bc388e9453456dfb7064ca886e5ed0018738", kill_on_drop: false }` [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter_8/test_collection.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter_8/test_collection.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter_8/test_string.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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/chapter_8/test_string.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | 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/chapter_8/test_string.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let hello = String::from("السلام عليكم"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let hello = String::from("Dobrý den"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let hello = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let hello = String::from("שָׁלוֹם"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Compiling gw-rust-programming-tutorial v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let hello = String::from("नमस्ते"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let hello = String::from("こんにちは"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let hello = String::from("안녕하세요"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let hello = String::from("你好"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let hello = String::from("Olá"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let hello = String::from("Здравствуйте"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let hello = String::from("Hola"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chapter_8/test_string.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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: unused variable: `s3` [INFO] [stdout] --> src/chapter_8/test_string.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let s3 = s1 + &s2; // 注意 s1 被移动了,不能继续使用 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/chapter_9/test_panic.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | 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: `it1` [INFO] [stdout] --> src/chapter_13/file_iterator.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let it1 = v1.iter_mut(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `it1` [INFO] [stdout] --> src/chapter_13/file_iterator.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let it1 = v1.into_iter(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | Int(i32), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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] 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] 36 - Int(i32), [INFO] [stdout] 36 + Int(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:37:15 [INFO] [stdout] | [INFO] [stdout] 37 | Float(f64), [INFO] [stdout] | ----- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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 - Float(f64), [INFO] [stdout] 37 + Float(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | Text(String), [INFO] [stdout] | ---- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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] 38 - Text(String), [INFO] [stdout] 38 + Text(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/chapter_10/test_traits.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chapter_10/test_traits.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 56 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 57 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/chapter_10/test_traits.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 65 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 66 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/lib.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | test_panic::read_username_from_file(); [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)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 29 | let _ = test_panic::read_username_from_file(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mapCus` should have a snake case name [INFO] [stdout] --> src/chapter_8/test_map.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut mapCus:HashMap=HashMap::new(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `map_cus` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/chapter_12/test_12_6.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | parse_env(); [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] 6 | let _ = parse_env(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `fnum` [INFO] [stdout] --> src/main.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 34 | let fnum: f32 = 3.0; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_fnum` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> src/main.rs:35:9 [INFO] [stdout] | [INFO] [stdout] 35 | let ch: char = 'a'; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> src/main.rs:42:16 [INFO] [stdout] | [INFO] [stdout] 42 | let (x, y, z) = tu1; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s1` [INFO] [stdout] --> src/main.rs:217:9 [INFO] [stdout] | [INFO] [stdout] 217 | let s1 = gives_ownership(); // gives_ownership 将返回值 [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/main.rs:222:9 [INFO] [stdout] | [INFO] [stdout] 222 | let s3 = takes_and_gives_back(s2); // s2 被移动到 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `username`, `email`, and `sign_in_count` are never read [INFO] [stdout] --> src/main.rs:279:5 [INFO] [stdout] | [INFO] [stdout] 277 | struct User { [INFO] [stdout] | ---- fields in this struct [INFO] [stdout] 278 | active: bool, [INFO] [stdout] 279 | username: String, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] 280 | email: String, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 281 | sign_in_count: u64, [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] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0`, `1`, and `2` are never read [INFO] [stdout] --> src/main.rs:322:14 [INFO] [stdout] | [INFO] [stdout] 322 | struct Color(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] = note: `Color` 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 `0`, `1`, and `2` are never read [INFO] [stdout] --> src/main.rs:324:14 [INFO] [stdout] | [INFO] [stdout] 324 | struct Point(i32, i32, i32); [INFO] [stdout] | ----- ^^^ ^^^ ^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [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 `0` is never read [INFO] [stdout] --> src/main.rs:366:9 [INFO] [stdout] | [INFO] [stdout] 366 | Ooo(Option), [INFO] [stdout] | --- ^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `Message` 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] 366 - Ooo(Option), [INFO] [stdout] 366 + Ooo(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Quit`, `Move`, `Write`, and `ChangeColor` are never constructed [INFO] [stdout] --> src/main.rs:362:5 [INFO] [stdout] | [INFO] [stdout] 361 | enum Message { [INFO] [stdout] | ------- variants in this enum [INFO] [stdout] 362 | Quit, [INFO] [stdout] | ^^^^ [INFO] [stdout] 363 | Move { x: i32, y: i32 }, [INFO] [stdout] | ^^^^ [INFO] [stdout] 364 | Write(String), [INFO] [stdout] | ^^^^^ [INFO] [stdout] 365 | ChangeColor(i32, i32, i32), [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Message` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `Nickel`, `Dime`, and `Quarter` are never constructed [INFO] [stdout] --> src/main.rs:383:5 [INFO] [stdout] | [INFO] [stdout] 381 | enum Coin { [INFO] [stdout] | ---- variants in this enum [INFO] [stdout] 382 | Penny, [INFO] [stdout] 383 | Nickel, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] 384 | Dime, [INFO] [stdout] | ^^^^ [INFO] [stdout] 385 | Quarter, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `test_optionT_match` should have a snake case name [INFO] [stdout] --> src/main.rs:407:4 [INFO] [stdout] | [INFO] [stdout] 407 | fn test_optionT_match() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_option_t_match` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter_8/test_collection.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let v: Vec = Vec::new(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v` [INFO] [stdout] --> src/chapter_8/test_collection.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 5 | let v = vec![1, 2, 3]; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s` [INFO] [stdout] --> src/chapter_8/test_string.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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/chapter_8/test_string.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 8 | 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/chapter_8/test_string.rs:11:9 [INFO] [stdout] | [INFO] [stdout] 11 | let s = "initial contents".to_string(); [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | let hello = String::from("السلام عليكم"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:15:9 [INFO] [stdout] | [INFO] [stdout] 15 | let hello = String::from("Dobrý den"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:16:9 [INFO] [stdout] | [INFO] [stdout] 16 | let hello = String::from("Hello"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | let hello = String::from("שָׁלוֹם"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | let hello = String::from("नमस्ते"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let hello = String::from("こんにちは"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let hello = String::from("안녕하세요"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | let hello = String::from("你好"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let hello = String::from("Olá"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | let hello = String::from("Здравствуйте"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `hello` [INFO] [stdout] --> src/chapter_8/test_string.rs:24:9 [INFO] [stdout] | [INFO] [stdout] 24 | let hello = String::from("Hola"); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/chapter_8/test_string.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let mut s = String::new(); [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: unused variable: `s3` [INFO] [stdout] --> src/chapter_8/test_string.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 50 | let s3 = s1 + &s2; // 注意 s1 被移动了,不能继续使用 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/chapter_9/test_panic.rs:18:9 [INFO] [stdout] | [INFO] [stdout] 18 | 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: `it1` [INFO] [stdout] --> src/chapter_13/file_iterator.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 31 | let it1 = v1.iter_mut(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `it1` [INFO] [stdout] --> src/chapter_13/file_iterator.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | let it1 = v1.into_iter(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:36:13 [INFO] [stdout] | [INFO] [stdout] 36 | Int(i32), [INFO] [stdout] | --- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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] 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] 36 - Int(i32), [INFO] [stdout] 36 + Int(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:37:15 [INFO] [stdout] | [INFO] [stdout] 37 | Float(f64), [INFO] [stdout] | ----- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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 - Float(f64), [INFO] [stdout] 37 + Float(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/chapter_8/test_collection.rs:38:14 [INFO] [stdout] | [INFO] [stdout] 38 | Text(String), [INFO] [stdout] | ---- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this variant [INFO] [stdout] | [INFO] [stdout] = note: `SpreadsheetCell` 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] 38 - Text(String), [INFO] [stdout] 38 + Text(()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Pair` is never constructed [INFO] [stdout] --> src/chapter_10/test_traits.rs:51:8 [INFO] [stdout] | [INFO] [stdout] 51 | struct Pair { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/chapter_10/test_traits.rs:57:8 [INFO] [stdout] | [INFO] [stdout] 56 | impl Pair { [INFO] [stdout] | --------------- associated function in this implementation [INFO] [stdout] 57 | fn new(x: T, y: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `cmp_display` is never used [INFO] [stdout] --> src/chapter_10/test_traits.rs:66:8 [INFO] [stdout] | [INFO] [stdout] 65 | impl Pair { [INFO] [stdout] | ------------------------------------- method in this implementation [INFO] [stdout] 66 | fn cmp_display(&self) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/lib.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | test_panic::read_username_from_file(); [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)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 29 | let _ = test_panic::read_username_from_file(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable `mapCus` should have a snake case name [INFO] [stdout] --> src/chapter_8/test_map.rs:24:13 [INFO] [stdout] | [INFO] [stdout] 24 | let mut mapCus:HashMap=HashMap::new(); [INFO] [stdout] | ^^^^^^ help: convert the identifier to snake case: `map_cus` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/chapter_12/test_12_6.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | parse_env(); [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] 6 | let _ = parse_env(); [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.70s [INFO] running `Command { std: "docker" "inspect" "e371101ae18be93ad9a754d43361bc388e9453456dfb7064ca886e5ed0018738", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e371101ae18be93ad9a754d43361bc388e9453456dfb7064ca886e5ed0018738", kill_on_drop: false }` [INFO] [stdout] e371101ae18be93ad9a754d43361bc388e9453456dfb7064ca886e5ed0018738 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 919e7c10f8a24001dcc7081c6f83a3d667330ba81c6362052a49e4fb39a46c60 [INFO] running `Command { std: "docker" "start" "-a" "919e7c10f8a24001dcc7081c6f83a3d667330ba81c6362052a49e4fb39a46c60", kill_on_drop: false }` [INFO] [stderr] warning: unused variable: `v` [INFO] [stderr] --> src/chapter_8/test_collection.rs:2:9 [INFO] [stderr] | [INFO] [stderr] 2 | let v: Vec = Vec::new(); [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `v` [INFO] [stderr] --> src/chapter_8/test_collection.rs:5:9 [INFO] [stderr] | [INFO] [stderr] 5 | let v = vec![1, 2, 3]; [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_v` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `s` [INFO] [stderr] --> src/chapter_8/test_string.rs:3:13 [INFO] [stderr] | [INFO] [stderr] 3 | let mut s = String::new(); [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `s` [INFO] [stderr] --> src/chapter_8/test_string.rs:8:9 [INFO] [stderr] | [INFO] [stderr] 8 | let s = data.to_string(); [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `s` [INFO] [stderr] --> src/chapter_8/test_string.rs:11:9 [INFO] [stderr] | [INFO] [stderr] 11 | let s = "initial contents".to_string(); [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_s` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:14:9 [INFO] [stderr] | [INFO] [stderr] 14 | let hello = String::from("السلام عليكم"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:15:9 [INFO] [stderr] | [INFO] [stderr] 15 | let hello = String::from("Dobrý den"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:16:9 [INFO] [stderr] | [INFO] [stderr] 16 | let hello = String::from("Hello"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:17:9 [INFO] [stderr] | [INFO] [stderr] 17 | let hello = String::from("שָׁלוֹם"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | let hello = String::from("नमस्ते"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:19:9 [INFO] [stderr] | [INFO] [stderr] 19 | let hello = String::from("こんにちは"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:20:9 [INFO] [stderr] | [INFO] [stderr] 20 | let hello = String::from("안녕하세요"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stdout] [INFO] [stderr] --> src/chapter_8/test_string.rs:21:9 [INFO] [stdout] running 0 tests [INFO] [stderr] | [INFO] [stdout] [INFO] [stderr] 21 | let hello = String::from("你好"); [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stdout] [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:22:9 [INFO] [stderr] | [INFO] [stderr] 22 | let hello = String::from("Olá"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:23:9 [INFO] [stderr] | [INFO] [stderr] 23 | let hello = String::from("Здравствуйте"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `hello` [INFO] [stderr] --> src/chapter_8/test_string.rs:24:9 [INFO] [stderr] | [INFO] [stderr] 24 | let hello = String::from("Hola"); [INFO] [stderr] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_hello` [INFO] [stderr] [INFO] [stderr] warning: variable does not need to be mutable [INFO] [stderr] --> src/chapter_8/test_string.rs:3:9 [INFO] [stderr] | [INFO] [stderr] 3 | let mut s = String::new(); [INFO] [stderr] | ----^ [INFO] [stderr] | | [INFO] [stderr] | help: remove this `mut` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `s3` [INFO] [stderr] --> src/chapter_8/test_string.rs:50:9 [INFO] [stderr] | [INFO] [stderr] 50 | let s3 = s1 + &s2; // 注意 s1 被移动了,不能继续使用 [INFO] [stderr] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `f` [INFO] [stderr] --> src/chapter_9/test_panic.rs:18:9 [INFO] [stderr] | [INFO] [stderr] 18 | let f = File::open("hello.txt").unwrap(); [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `it1` [INFO] [stderr] --> src/chapter_13/file_iterator.rs:31:9 [INFO] [stderr] | [INFO] [stderr] 31 | let it1 = v1.iter_mut(); [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `it1` [INFO] [stderr] --> src/chapter_13/file_iterator.rs:32:9 [INFO] [stderr] | [INFO] [stderr] 32 | let it1 = v1.into_iter(); [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_it1` [INFO] [stderr] [INFO] [stderr] warning: field `0` is never read [INFO] [stderr] --> src/chapter_8/test_collection.rs:36:13 [INFO] [stderr] | [INFO] [stderr] 36 | Int(i32), [INFO] [stderr] | --- ^^^ [INFO] [stderr] | | [INFO] [stderr] | field in this variant [INFO] [stderr] | [INFO] [stderr] = note: `SpreadsheetCell` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stderr] | [INFO] [stderr] 36 - Int(i32), [INFO] [stderr] 36 + Int(()), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: field `0` is never read [INFO] [stderr] --> src/chapter_8/test_collection.rs:37:15 [INFO] [stderr] | [INFO] [stderr] 37 | Float(f64), [INFO] [stderr] | ----- ^^^ [INFO] [stderr] | | [INFO] [stderr] | field in this variant [INFO] [stderr] | [INFO] [stderr] = note: `SpreadsheetCell` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stderr] | [INFO] [stderr] 37 - Float(f64), [INFO] [stderr] 37 + Float(()), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: field `0` is never read [INFO] [stderr] --> src/chapter_8/test_collection.rs:38:14 [INFO] [stderr] | [INFO] [stderr] 38 | Text(String), [INFO] [stderr] | ---- ^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | field in this variant [INFO] [stderr] | [INFO] [stderr] = note: `SpreadsheetCell` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stderr] | [INFO] [stderr] 38 - Text(String), [INFO] [stderr] 38 + Text(()), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: struct `Pair` is never constructed [INFO] [stderr] --> src/chapter_10/test_traits.rs:51:8 [INFO] [stderr] | [INFO] [stderr] 51 | struct Pair { [INFO] [stderr] | ^^^^ [INFO] [stderr] [INFO] [stderr] warning: associated function `new` is never used [INFO] [stderr] --> src/chapter_10/test_traits.rs:57:8 [INFO] [stderr] | [INFO] [stderr] 56 | impl Pair { [INFO] [stderr] | --------------- associated function in this implementation [INFO] [stderr] 57 | fn new(x: T, y: T) -> Self { [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: method `cmp_display` is never used [INFO] [stderr] --> src/chapter_10/test_traits.rs:66:8 [INFO] [stderr] | [INFO] [stderr] 65 | impl Pair { [INFO] [stderr] | ------------------------------------- method in this implementation [INFO] [stderr] 66 | fn cmp_display(&self) { [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused `Result` that must be used [INFO] [stderr] --> src/lib.rs:29:5 [INFO] [stderr] | [INFO] [stderr] 29 | test_panic::read_username_from_file(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] = note: `#[warn(unused_must_use)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] help: use `let _ = ...` to ignore the resulting value [INFO] [stderr] | [INFO] [stderr] 29 | let _ = test_panic::read_username_from_file(); [INFO] [stderr] | +++++++ [INFO] [stderr] [INFO] [stderr] warning: variable `mapCus` should have a snake case name [INFO] [stderr] --> src/chapter_8/test_map.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | let mut mapCus:HashMap=HashMap::new(); [INFO] [stderr] | ^^^^^^ help: convert the identifier to snake case: `map_cus` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused `Result` that must be used [INFO] [stderr] --> src/chapter_12/test_12_6.rs:6:5 [INFO] [stderr] | [INFO] [stderr] 6 | parse_env(); [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: this `Result` may be an `Err` variant, which should be handled [INFO] [stderr] help: use `let _ = ...` to ignore the resulting value [INFO] [stderr] | [INFO] [stderr] 6 | let _ = parse_env(); [INFO] [stderr] | +++++++ [INFO] [stderr] [INFO] [stderr] warning: `gw-rust-programming-tutorial` (lib) generated 30 warnings (run `cargo fix --lib -p gw-rust-programming-tutorial` to apply 1 suggestion) [INFO] [stdout] [INFO] [stderr] warning: unused variable: `fnum` [INFO] [stdout] running 0 tests [INFO] [stderr] --> src/main.rs:34:9 [INFO] [stdout] [INFO] [stderr] | [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stderr] 34 | let fnum: f32 = 3.0; [INFO] [stdout] [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_fnum` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `ch` [INFO] [stderr] --> src/main.rs:35:9 [INFO] [stderr] | [INFO] [stderr] 35 | let ch: char = 'a'; [INFO] [stderr] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `z` [INFO] [stderr] --> src/main.rs:42:16 [INFO] [stderr] | [INFO] [stderr] 42 | let (x, y, z) = tu1; [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `s1` [INFO] [stderr] --> src/main.rs:217:9 [INFO] [stderr] | [INFO] [stderr] 217 | let s1 = gives_ownership(); // gives_ownership 将返回值 [INFO] [stderr] | ^^ help: if this is intentional, prefix it with an underscore: `_s1` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `s3` [INFO] [stderr] --> src/main.rs:222:9 [INFO] [stderr] | [INFO] [stderr] 222 | let s3 = takes_and_gives_back(s2); // s2 被移动到 [INFO] [stderr] | ^^ help: if this is intentional, prefix it with an underscore: `_s3` [INFO] [stderr] [INFO] [stderr] warning: fields `username`, `email`, and `sign_in_count` are never read [INFO] [stderr] --> src/main.rs:279:5 [INFO] [stderr] | [INFO] [stderr] 277 | struct User { [INFO] [stderr] | ---- fields in this struct [INFO] [stderr] 278 | active: bool, [INFO] [stderr] 279 | username: String, [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] 280 | email: String, [INFO] [stderr] | ^^^^^ [INFO] [stderr] 281 | sign_in_count: u64, [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `User` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: fields `0`, `1`, and `2` are never read [INFO] [stderr] --> src/main.rs:322:14 [INFO] [stderr] | [INFO] [stderr] 322 | struct Color(i32, i32, i32); [INFO] [stderr] | ----- ^^^ ^^^ ^^^ [INFO] [stderr] | | [INFO] [stderr] | fields in this struct [INFO] [stderr] | [INFO] [stderr] = help: consider removing these fields [INFO] [stderr] = note: `Color` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: fields `0`, `1`, and `2` are never read [INFO] [stderr] --> src/main.rs:324:14 [INFO] [stderr] | [INFO] [stderr] 324 | struct Point(i32, i32, i32); [INFO] [stderr] | ----- ^^^ ^^^ ^^^ [INFO] [stderr] | | [INFO] [stderr] | fields in this struct [INFO] [stderr] | [INFO] [stderr] = help: consider removing these fields [INFO] [stderr] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: field `0` is never read [INFO] [stderr] --> src/main.rs:366:9 [INFO] [stderr] | [INFO] [stderr] 366 | Ooo(Option), [INFO] [stderr] | --- ^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | field in this variant [INFO] [stderr] | [INFO] [stderr] = note: `Message` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field [INFO] [stderr] | [INFO] [stderr] 366 - Ooo(Option), [INFO] [stderr] 366 + Ooo(()), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: variants `Quit`, `Move`, `Write`, and `ChangeColor` are never constructed [INFO] [stderr] --> src/main.rs:362:5 [INFO] [stderr] | [INFO] [stderr] 361 | enum Message { [INFO] [stderr] | ------- variants in this enum [INFO] [stderr] 362 | Quit, [INFO] [stderr] | ^^^^ [INFO] [stderr] 363 | Move { x: i32, y: i32 }, [INFO] [stderr] | ^^^^ [INFO] [stderr] 364 | Write(String), [INFO] [stderr] | ^^^^^ [INFO] [stderr] 365 | ChangeColor(i32, i32, i32), [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `Message` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] [INFO] [stderr] warning: variants `Nickel`, `Dime`, and `Quarter` are never constructed [INFO] [stderr] --> src/main.rs:383:5 [INFO] [stderr] | [INFO] [stderr] 381 | enum Coin { [INFO] [stderr] | ---- variants in this enum [INFO] [stderr] 382 | Penny, [INFO] [stderr] 383 | Nickel, [INFO] [stderr] | ^^^^^^ [INFO] [stderr] 384 | Dime, [INFO] [stderr] | ^^^^ [INFO] [stderr] 385 | Quarter, [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function `test_optionT_match` should have a snake case name [INFO] [stderr] --> src/main.rs:407:4 [INFO] [stderr] | [INFO] [stderr] 407 | fn test_optionT_match() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `test_option_t_match` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default [INFO] [stderr] [INFO] [stderr] warning: `gw-rust-programming-tutorial` (bin "gw-rust-programming-tutorial" test) generated 12 warnings [INFO] [stderr] warning: `gw-rust-programming-tutorial` (lib test) generated 30 warnings (30 duplicates) [INFO] [stderr] Finished `test` profile [unoptimized + debuginfo] target(s) in 0.05s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/debug/deps/gw_rust_programming_tutorial-fdf2bb0bdaec0615) [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/debug/deps/gw_rust_programming_tutorial-8c8c5b1bfa7e3d79) [INFO] [stderr] Doc-tests gw_rust_programming_tutorial [INFO] [stdout] [INFO] [stdout] running 1 test [INFO] [stdout] test src/chapter_10/test_lifetime.rs - chapter_10::test_lifetime::test_lifetime_fn (line 3) ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.23s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "919e7c10f8a24001dcc7081c6f83a3d667330ba81c6362052a49e4fb39a46c60", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "919e7c10f8a24001dcc7081c6f83a3d667330ba81c6362052a49e4fb39a46c60", kill_on_drop: false }` [INFO] [stdout] 919e7c10f8a24001dcc7081c6f83a3d667330ba81c6362052a49e4fb39a46c60