[INFO] cloning repository https://github.com/SunTiebing/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/SunTiebing/learn_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSunTiebing%2Flearn_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSunTiebing%2Flearn_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 60b3ffe529bd24bd66aaf5c21b9217f1af2b1556 [INFO] checking SunTiebing/learn_rust/60b3ffe529bd24bd66aaf5c21b9217f1af2b1556 against master#f609b7e0586f81fefb3523e3e17adf779ac416be for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSunTiebing%2Flearn_rust" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/SunTiebing/learn_rust on toolchain f609b7e0586f81fefb3523e3e17adf779ac416be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/SunTiebing/learn_rust [INFO] finished tweaking git repo https://github.com/SunTiebing/learn_rust [INFO] tweaked toml for git repo https://github.com/SunTiebing/learn_rust written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/SunTiebing/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" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded futures v0.3.25 [INFO] [stderr] Downloaded proc-macro2 v1.0.47 [INFO] [stderr] Downloaded syn v1.0.103 [INFO] [stderr] Downloaded libc v0.2.137 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] dc66686bbd3c5c9729f026857f1abf723f5285c58c66a9b65363275da9994232 [INFO] running `Command { std: "docker" "start" "-a" "dc66686bbd3c5c9729f026857f1abf723f5285c58c66a9b65363275da9994232", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "dc66686bbd3c5c9729f026857f1abf723f5285c58c66a9b65363275da9994232", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dc66686bbd3c5c9729f026857f1abf723f5285c58c66a9b65363275da9994232", kill_on_drop: false }` [INFO] [stdout] dc66686bbd3c5c9729f026857f1abf723f5285c58c66a9b65363275da9994232 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 953c9c0a56f5574585cda6cdf973ad78e19cb42bd60f49a3de06609148041357 [INFO] running `Command { std: "docker" "start" "-a" "953c9c0a56f5574585cda6cdf973ad78e19cb42bd60f49a3de06609148041357", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling proc-macro2 v1.0.47 [INFO] [stderr] Compiling unicode-ident v1.0.5 [INFO] [stderr] Compiling quote v1.0.21 [INFO] [stderr] Compiling syn v1.0.103 [INFO] [stderr] Compiling libc v0.2.137 [INFO] [stderr] Compiling futures-channel v0.3.25 [INFO] [stderr] Compiling futures-util v0.3.25 [INFO] [stderr] Checking futures-sink v0.3.25 [INFO] [stderr] Checking futures-io v0.3.25 [INFO] [stderr] Checking thread_pool v0.1.0 (/opt/rustwide/workdir/thread_pool) [INFO] [stderr] Checking minigrep v0.1.0 (/opt/rustwide/workdir/minigrep) [INFO] [stderr] Checking hello_cargo v0.1.0 (/opt/rustwide/workdir/hello_cargo) [INFO] [stderr] Checking rust_course v0.1.0 (/opt/rustwide/workdir/rust_course) [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> hello_cargo/src/main.rs:3:27 [INFO] [stdout] | [INFO] [stdout] 3 | io::{self, ErrorKind, Read}, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> hello_cargo/src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let s2 = Student { number: 2, ..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: `f` [INFO] [stdout] --> hello_cargo/src/main.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let f = match file { [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] --> hello_cargo/src/main.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let f = File::open("hello.txt").unwrap(); // 不可以自定义panic [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] --> hello_cargo/src/main.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let f = File::open("hello.txt").expect("Error opening file"); //可以自定义panic [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] --> hello_cargo/src/main.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | let f = match file { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `file` [INFO] [stdout] --> hello_cargo/src/main.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | let file = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> hello_cargo/src/main.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let f = match File::open("hello.txt") { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> hello_cargo/src/main.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `area`, `can_hold`, and `square` are never used [INFO] [stdout] --> hello_cargo/src/main.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 36 | impl Rectangle { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 37 | fn area(&self) -> u128 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn square(size: u128) -> Rectangle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_file` is never used [INFO] [stdout] --> hello_cargo/src/main.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn read_file() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `open_file` is never used [INFO] [stdout] --> hello_cargo/src/main.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn open_file() -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 12 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_workout` is never used [INFO] [stdout] --> minigrep/src/lib.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn generate_workout(intensity: u32, random_number: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Cacher` is never constructed [INFO] [stdout] --> minigrep/src/lib.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | struct Cacher [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `value` are never used [INFO] [stdout] --> minigrep/src/lib.rs:116:8 [INFO] [stdout] | [INFO] [stdout] 112 | / impl Cacher [INFO] [stdout] 113 | | where [INFO] [stdout] 114 | | T: Fn(u32) -> u32, [INFO] [stdout] | |______________________- associated items in this implementation [INFO] [stdout] 115 | { [INFO] [stdout] 116 | fn new(calculation: T) -> Cacher { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 123 | fn value(&mut self, args: u32) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_test` is never used [INFO] [stdout] --> minigrep/src/lib.rs:136:4 [INFO] [stdout] | [INFO] [stdout] 136 | fn move_test() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 4 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `v5` [INFO] [stdout] --> minigrep/src/lib.rs:173:13 [INFO] [stdout] | [INFO] [stdout] 173 | let v5: i32 = v1 [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_v5` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> minigrep/src/lib.rs:154:13 [INFO] [stdout] | [INFO] [stdout] 154 | let mut v1 = vec![1, 2, 3]; [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] --> minigrep/src/lib.rs:155:13 [INFO] [stdout] | [INFO] [stdout] 155 | let mut v2: Vec = v1.iter().map(|x| x + 1).collect(); [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `generate_workout` is never used [INFO] [stdout] --> minigrep/src/lib.rs:73:4 [INFO] [stdout] | [INFO] [stdout] 73 | fn generate_workout(intensity: u32, random_number: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Cacher` is never constructed [INFO] [stdout] --> minigrep/src/lib.rs:104:8 [INFO] [stdout] | [INFO] [stdout] 104 | struct Cacher [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `value` are never used [INFO] [stdout] --> minigrep/src/lib.rs:116:8 [INFO] [stdout] | [INFO] [stdout] 112 | / impl Cacher [INFO] [stdout] 113 | | where [INFO] [stdout] 114 | | T: Fn(u32) -> u32, [INFO] [stdout] | |______________________- associated items in this implementation [INFO] [stdout] 115 | { [INFO] [stdout] 116 | fn new(calculation: T) -> Cacher { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 123 | fn value(&mut self, args: u32) -> u32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `move_test` is never used [INFO] [stdout] --> minigrep/src/lib.rs:136:4 [INFO] [stdout] | [INFO] [stdout] 136 | fn move_test() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 7 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Course` is never constructed [INFO] [stdout] --> rust_course/src/course_three/course.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Course { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Course` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `add_student`, `remove_student`, and `new` are never used [INFO] [stdout] --> rust_course/src/course_three/course.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Course { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 10 | pub fn add_student(&mut self, student: Student) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | pub fn remove_student(&mut self, name: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn new(name: String, students: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Society` is never constructed [INFO] [stdout] --> rust_course/src/course_three/society.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Society { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Society` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `change_name`, `add_student`, `remove_student`, and `new` are never used [INFO] [stdout] --> rust_course/src/course_three/society.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Society { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 10 | pub fn change_name(&mut self, name: String) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | pub fn add_student(&mut self, student: Student) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn remove_student(&mut self, name: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn new(name: String, members: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `age`, and `class` are never read [INFO] [stdout] --> rust_course/src/course_three/student.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Student { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 8 | pub num: u32, [INFO] [stdout] 9 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 10 | pub age: u32, [INFO] [stdout] | ^^^ [INFO] [stdout] 11 | pub class: Option, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Student` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `change_name`, `change_age`, `change_class`, and `dismiss_student` are never used [INFO] [stdout] --> rust_course/src/course_three/student.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Student { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn change_name(&mut self, name: String) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn change_age(&mut self, age: u32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn change_class(&mut self, class: Class) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn dismiss_student(id: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> hello_cargo/src/main.rs:3:27 [INFO] [stdout] | [INFO] [stdout] 3 | io::{self, ErrorKind, Read}, [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Course` is never constructed [INFO] [stdout] --> rust_course/src/course_three/course.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Course { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Course` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `add_student`, `remove_student`, and `new` are never used [INFO] [stdout] --> rust_course/src/course_three/course.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Course { [INFO] [stdout] | ----------- associated items in this implementation [INFO] [stdout] 10 | pub fn add_student(&mut self, student: Student) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | pub fn remove_student(&mut self, name: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 22 | pub fn new(name: String, students: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Society` is never constructed [INFO] [stdout] --> rust_course/src/course_three/society.rs:4:12 [INFO] [stdout] | [INFO] [stdout] 4 | pub struct Society { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Society` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `change_name`, `add_student`, `remove_student`, and `new` are never used [INFO] [stdout] --> rust_course/src/course_three/society.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Society { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] 10 | pub fn change_name(&mut self, name: String) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 14 | pub fn add_student(&mut self, student: Student) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 18 | pub fn remove_student(&mut self, name: String) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 26 | pub fn new(name: String, members: Vec) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `age`, and `class` are never read [INFO] [stdout] --> rust_course/src/course_three/student.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct Student { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 8 | pub num: u32, [INFO] [stdout] 9 | pub name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 10 | pub age: u32, [INFO] [stdout] | ^^^ [INFO] [stdout] 11 | pub class: Option, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Student` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `change_name`, `change_age`, `change_class`, and `dismiss_student` are never used [INFO] [stdout] --> rust_course/src/course_three/student.rs:30:12 [INFO] [stdout] | [INFO] [stdout] 14 | impl Student { [INFO] [stdout] | ------------ associated items in this implementation [INFO] [stdout] ... [INFO] [stdout] 30 | pub fn change_name(&mut self, name: String) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 34 | pub fn change_age(&mut self, age: u32) { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 38 | pub fn change_class(&mut self, class: Class) { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | pub fn dismiss_student(id: u32) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> hello_cargo/src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | let s2 = Student { number: 2, ..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: `f` [INFO] [stdout] --> hello_cargo/src/main.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | let f = match file { [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] --> hello_cargo/src/main.rs:62:9 [INFO] [stdout] | [INFO] [stdout] 62 | let f = File::open("hello.txt").unwrap(); // 不可以自定义panic [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] --> hello_cargo/src/main.rs:63:9 [INFO] [stdout] | [INFO] [stdout] 63 | let f = File::open("hello.txt").expect("Error opening file"); //可以自定义panic [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] --> hello_cargo/src/main.rs:67:9 [INFO] [stdout] | [INFO] [stdout] 67 | let f = match file { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `file` [INFO] [stdout] --> hello_cargo/src/main.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 81 | let file = File::open("hello.txt").unwrap_or_else(|error| { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_file` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 6 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> hello_cargo/src/main.rs:94:9 [INFO] [stdout] | [INFO] [stdout] 94 | let f = match File::open("hello.txt") { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name`, `age`, and `number` are never read [INFO] [stdout] --> hello_cargo/src/main.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 12 | struct Student { [INFO] [stdout] | ------- fields in this struct [INFO] [stdout] 13 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 14 | age: i128, [INFO] [stdout] | ^^^ [INFO] [stdout] 15 | number: i128, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Rectangle` is never constructed [INFO] [stdout] --> hello_cargo/src/main.rs:31:8 [INFO] [stdout] | [INFO] [stdout] 31 | struct Rectangle { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `area`, `can_hold`, and `square` are never used [INFO] [stdout] --> hello_cargo/src/main.rs:37:8 [INFO] [stdout] | [INFO] [stdout] 36 | impl Rectangle { [INFO] [stdout] | -------------- associated items in this implementation [INFO] [stdout] 37 | fn area(&self) -> u128 { [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn can_hold(&self, other: &Rectangle) -> bool { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 45 | fn square(size: u128) -> Rectangle { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `read_file` is never used [INFO] [stdout] --> hello_cargo/src/main.rs:53:4 [INFO] [stdout] | [INFO] [stdout] 53 | fn read_file() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `open_file` is never used [INFO] [stdout] --> hello_cargo/src/main.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn open_file() -> Result { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 13 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0635]: unknown feature `proc_macro_span_shrink` [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.47/src/lib.rs:92:30 [INFO] [stdout] | [INFO] [stdout] 92 | feature(proc_macro_span, proc_macro_span_shrink) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0635`. [INFO] [stdout] [INFO] [stderr] error: could not compile `proc-macro2` (lib) due to 2 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] running `Command { std: "docker" "inspect" "953c9c0a56f5574585cda6cdf973ad78e19cb42bd60f49a3de06609148041357", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "953c9c0a56f5574585cda6cdf973ad78e19cb42bd60f49a3de06609148041357", kill_on_drop: false }` [INFO] [stdout] 953c9c0a56f5574585cda6cdf973ad78e19cb42bd60f49a3de06609148041357