[INFO] cloning repository https://github.com/flikeok/rust_example [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/flikeok/rust_example" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflikeok%2Frust_example", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflikeok%2Frust_example'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 5d7f73bbef7cd9c4ac23591a14b013d2337004a7 [INFO] checking flikeok/rust_example/5d7f73bbef7cd9c4ac23591a14b013d2337004a7 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fflikeok%2Frust_example" "/workspace/builds/worker-6-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/flikeok/rust_example on toolchain ccf408f4326a858c00dd845a64a86b16f360a801 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/flikeok/rust_example [INFO] finished tweaking git repo https://github.com/flikeok/rust_example [INFO] tweaked toml for git repo https://github.com/flikeok/rust_example written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/flikeok/rust_example 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" "+ccf408f4326a858c00dd845a64a86b16f360a801" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f492ace286e378b94b579a5b32745ab025d5fb3c0d5346e411235b9eaa7735db [INFO] running `Command { std: "docker" "start" "-a" "f492ace286e378b94b579a5b32745ab025d5fb3c0d5346e411235b9eaa7735db", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f492ace286e378b94b579a5b32745ab025d5fb3c0d5346e411235b9eaa7735db", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f492ace286e378b94b579a5b32745ab025d5fb3c0d5346e411235b9eaa7735db", kill_on_drop: false }` [INFO] [stdout] f492ace286e378b94b579a5b32745ab025d5fb3c0d5346e411235b9eaa7735db [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:6252d7ea7fb8caaf7af6d800c5fb250a9cd862b9a7f9508afb3c54fa7fe1102e" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 7169d70f0911deae7f79354df87811bc40d6331e2407ac0d009d4b115cb30612 [INFO] running `Command { std: "docker" "start" "-a" "7169d70f0911deae7f79354df87811bc40d6331e2407ac0d009d4b115cb30612", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] Running `cargo fix --edition` [INFO] [stderr] Migrating Cargo.toml from 2021 edition to 2024 [INFO] [stderr] Checking rust_example v0.1.0 (/tmp/fixit) [INFO] [stderr] Migrating src/lib.rs from 2021 edition to 2024 [INFO] [stderr] Fixed src/ch19/files.rs (1 fix) [INFO] [stderr] Fixed src/ch18/errors.rs (1 fix) [INFO] [stderr] Fixed src/ch10/uses.rs (1 fix) [INFO] [stderr] Fixed src/ch19/threads.rs (1 fix) [INFO] [stderr] Fixed src/ch19/boxs.rs (4 fixes) [INFO] [stderr] Fixed src/ch14/mod.rs (1 fix) [INFO] [stderr] Fixed src/ch19/cmds.rs (1 fix) [INFO] [stderr] Fixed src/ch10/structs.rs (1 fix) [INFO] [stderr] Fixed src/ch6/to_strings.rs (1 fix) [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:2:8 [INFO] [stdout] | [INFO] [stdout] 2 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pub_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn pub_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `indirect_access` is never used [INFO] [stdout] --> src/ch10/mods.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn indirect_access() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `pub_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:18:46 [INFO] [stdout] | [INFO] [stdout] 18 | pub(in crate::ch10::mods::my_mod) fn pub_hello() { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `self_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | pub(self) fn self_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `super_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:26:23 [INFO] [stdout] | [INFO] [stdout] 26 | pub(super) fn super_hello() { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_super_in_nested` is never used [INFO] [stdout] --> src/ch10/mods.rs:30:16 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn call_super_in_nested() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_crate_hello` is never used [INFO] [stdout] --> src/ch10/mods.rs:34:23 [INFO] [stdout] | [INFO] [stdout] 34 | pub(crate) fn call_crate_hello() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `OpenBox` is never constructed [INFO] [stdout] --> src/ch10/structs.rs:3:16 [INFO] [stdout] | [INFO] [stdout] 3 | pub struct OpenBox { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `CloseBox` is never constructed [INFO] [stdout] --> src/ch10/structs.rs:7:16 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct CloseBox { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new` and `print` are never used [INFO] [stdout] --> src/ch10/structs.rs:15:16 [INFO] [stdout] | [INFO] [stdout] 11 | / impl CloseBox [INFO] [stdout] 12 | | where [INFO] [stdout] 13 | | T: std::fmt::Display, [INFO] [stdout] | |_____________________________- associated items in this implementation [INFO] [stdout] 14 | { [INFO] [stdout] 15 | pub fn new(t: T) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 19 | pub fn print(&self) { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:2:12 [INFO] [stdout] | [INFO] [stdout] 2 | pub fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `world` is never used [INFO] [stdout] --> src/ch10/uses.rs:5:12 [INFO] [stdout] | [INFO] [stdout] 5 | pub fn world() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn hello() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `call_hello` is never used [INFO] [stdout] --> src/ch10/uses.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn call_hello() { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `Animal` is never used [INFO] [stdout] --> src/ch16/traits.rs:1:7 [INFO] [stdout] | [INFO] [stdout] 1 | trait Animal { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Sheep` is never constructed [INFO] [stdout] --> src/ch16/traits.rs:5:8 [INFO] [stdout] | [INFO] [stdout] 5 | struct Sheep { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_sheep` is never used [INFO] [stdout] --> src/ch16/traits.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl Sheep { [INFO] [stdout] | ---------- associated function in this implementation [INFO] [stdout] 10 | pub fn new_sheep() -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new_duck` is never used [INFO] [stdout] --> src/ch16/traits.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 15 | impl Duck { [INFO] [stdout] | --------- associated function in this implementation [INFO] [stdout] 16 | pub fn new_duck() -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Duck` is never constructed [INFO] [stdout] --> src/ch16/traits.rs:27:8 [INFO] [stdout] | [INFO] [stdout] 27 | struct Duck { [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `random_animal` is never used [INFO] [stdout] --> src/ch16/traits.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | fn random_animal(i: i32) -> Box { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `map_string` is never used [INFO] [stdout] --> src/ch18/maps.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn map_string(s: Option) -> Option { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `ParseIntResult` is never used [INFO] [stdout] --> src/ch18/results.rs:3:6 [INFO] [stdout] | [INFO] [stdout] 3 | type ParseIntResult = Result; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `two_plus` is never used [INFO] [stdout] --> src/ch18/results.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn two_plus(l: String, r: String) -> ParseIntResult { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `double_first` is never used [INFO] [stdout] --> src/ch18/results.rs:25:4 [INFO] [stdout] | [INFO] [stdout] 25 | fn double_first(vec: Vec<&str>) -> Option> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Stu` is never constructed [INFO] [stdout] --> src/ch19/boxs.rs:3:8 [INFO] [stdout] | [INFO] [stdout] 3 | struct Stu<'a> { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/ch19/boxs.rs:9:12 [INFO] [stdout] | [INFO] [stdout] 8 | impl<'a> Stu<'a> { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] 9 | pub fn new(s: &'a str, i: i32) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `a_plus_b` is never used [INFO] [stdout] --> src/ch19/boxs.rs:92:4 [INFO] [stdout] | [INFO] [stdout] 92 | fn a_plus_b(i: i32, j: i32) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `reverse` is never used [INFO] [stdout] --> src/ch2/tuple.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | fn reverse(left:i32,right:bool)->(bool,i32){ [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Matrix` is never constructed [INFO] [stdout] --> src/ch2/tuple.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 24 | struct Matrix(f32, f32, f32, f32); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `trans` is never used [INFO] [stdout] --> src/ch2/tuple.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 33 | impl Matrix { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 36 | fn trans(&self)->Self{ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `slice` is never used [INFO] [stdout] --> src/ch2/array.rs:12:4 [INFO] [stdout] | [INFO] [stdout] 12 | fn slice(s:&[i32]){ [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/ch3/structs.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub struct Stu(i32,String); [INFO] [stdout] | --- ^^^ ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing these fields [INFO] [stdout] = note: `Stu` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: static `MY_WORLD` is never used [INFO] [stdout] --> src/ch3/consts.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | static MY_WORLD:&'static str = "hello"; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `NUM` is never used [INFO] [stdout] --> src/ch3/consts.rs:2:7 [INFO] [stdout] | [INFO] [stdout] 2 | const NUM:i32 = 10; [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: type alias `MyInt` is never used [INFO] [stdout] --> src/ch5/types.rs:1:6 [INFO] [stdout] | [INFO] [stdout] 1 | type MyInt = i32; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `Color` is never used [INFO] [stdout] --> src/ch8/ifs.rs:42:6 [INFO] [stdout] | [INFO] [stdout] 42 | enum Color { [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `age` are never read [INFO] [stdout] --> src/ch8/ifs.rs:81:5 [INFO] [stdout] | [INFO] [stdout] 80 | pub struct Stu { [INFO] [stdout] | --- fields in this struct [INFO] [stdout] 81 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 82 | age: i32, [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `apply` is never used [INFO] [stdout] --> src/ch9/closure.rs:140:4 [INFO] [stdout] | [INFO] [stdout] 140 | fn apply(f: F) [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 40 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `OpenBox` in this scope [INFO] [stdout] --> src/ch10/structs.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | let b = OpenBox { [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use crate::ch10::structs::my::OpenBox; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `CloseBox` [INFO] [stdout] --> src/ch10/structs.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | let cb = CloseBox::new("t"); [INFO] [stdout] | ^^^^^^^^ use of undeclared type `CloseBox` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use crate::ch10::structs::my::CloseBox; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `hello` in this scope [INFO] [stdout] --> src/ch10/uses.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | hello(); [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 1 + use crate::ch10::uses::my::hello; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `HashMap` [INFO] [stdout] --> src/ch19/boxs.rs:44:17 [INFO] [stdout] | [INFO] [stdout] 44 | let mut m = HashMap::new(); [INFO] [stdout] | ^^^^^^^ use of undeclared type `HashMap` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::collections::HashMap; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0412]: cannot find type `HashSet` in this scope [INFO] [stdout] --> src/ch19/boxs.rs:57:13 [INFO] [stdout] | [INFO] [stdout] 57 | let s1: HashSet = vec![1, 2, 2, 3, 4].iter().map(|&x| x + 1).collect(); [INFO] [stdout] | ^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::collections::HashSet; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Rc` [INFO] [stdout] --> src/ch19/boxs.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | let s = Rc::new("hello".to_owned()); [INFO] [stdout] | ^^ use of undeclared type `Rc` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::rc::Rc; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Rc` [INFO] [stdout] --> src/ch19/boxs.rs:67:28 [INFO] [stdout] | [INFO] [stdout] 67 | println!("s.count:{}", Rc::strong_count(&s)); [INFO] [stdout] | ^^ use of undeclared type `Rc` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::rc::Rc; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Arc` [INFO] [stdout] --> src/ch19/boxs.rs:72:13 [INFO] [stdout] | [INFO] [stdout] 72 | let s = Arc::new("world".to_owned()); [INFO] [stdout] | ^^^ use of undeclared type `Arc` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::sync::Arc; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `thread` [INFO] [stdout] --> src/ch19/boxs.rs:77:17 [INFO] [stdout] | [INFO] [stdout] 77 | let t = thread::spawn(move || { [INFO] [stdout] | ^^^^^^ use of undeclared crate or module `thread` [INFO] [stdout] | [INFO] [stdout] help: consider importing this module [INFO] [stdout] | [INFO] [stdout] 2 + use std::thread; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `thread` [INFO] [stdout] --> src/ch19/boxs.rs:99:9 [INFO] [stdout] | [INFO] [stdout] 99 | thread::spawn(move || { [INFO] [stdout] | ^^^^^^ use of undeclared crate or module `thread` [INFO] [stdout] | [INFO] [stdout] help: consider importing this module [INFO] [stdout] | [INFO] [stdout] 2 + use std::thread; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Command` [INFO] [stdout] --> src/ch19/cmds.rs:4:18 [INFO] [stdout] | [INFO] [stdout] 4 | let output = Command::new("echo").arg("hello").output().unwrap(); [INFO] [stdout] | ^^^^^^^ use of undeclared type `Command` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::process::Command; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Path` [INFO] [stdout] --> src/ch19/files.rs:4:13 [INFO] [stdout] | [INFO] [stdout] 4 | let p = Path::new("/tmp/hello.txt"); [INFO] [stdout] | ^^^^ use of undeclared type `Path` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::path::Path; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `File` [INFO] [stdout] --> src/ch19/files.rs:5:20 [INFO] [stdout] | [INFO] [stdout] 5 | let mut file = File::options() [INFO] [stdout] | ^^^^ use of undeclared type `File` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::fs::File; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `SeekFrom` [INFO] [stdout] --> src/ch19/files.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | file.seek(SeekFrom::Start(0)).unwrap(); [INFO] [stdout] | ^^^^^^^^ use of undeclared type `SeekFrom` [INFO] [stdout] | [INFO] [stdout] help: consider importing this enum [INFO] [stdout] | [INFO] [stdout] 2 + use std::io::SeekFrom; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `remove_file` in this scope [INFO] [stdout] --> src/ch19/files.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | remove_file(p).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 2 + use std::fs::remove_file; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `mpsc` [INFO] [stdout] --> src/ch19/threads.rs:4:20 [INFO] [stdout] | [INFO] [stdout] 4 | let (sx, rx) = mpsc::channel::(); [INFO] [stdout] | ^^^^ use of undeclared crate or module `mpsc` [INFO] [stdout] | [INFO] [stdout] help: consider importing this module [INFO] [stdout] | [INFO] [stdout] 2 + use std::sync::mpsc; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared crate or module `thread` [INFO] [stdout] --> src/ch19/threads.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | thread::spawn(move || { [INFO] [stdout] | ^^^^^^ use of undeclared crate or module `thread` [INFO] [stdout] | [INFO] [stdout] help: consider importing this module [INFO] [stdout] | [INFO] [stdout] 2 + use std::thread; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Path` [INFO] [stdout] --> src/ch19/threads.rs:23:13 [INFO] [stdout] | [INFO] [stdout] 23 | let p = Path::new("/usr/local/flike/a.txt"); [INFO] [stdout] | ^^^^ use of undeclared type `Path` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::path::Path; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Path` [INFO] [stdout] --> src/ch19/threads.rs:25:26 [INFO] [stdout] | [INFO] [stdout] 25 | assert_eq!(dir, Some(Path::new("/usr/local/flike"))); [INFO] [stdout] | ^^^^ use of undeclared type `Path` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::path::Path; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `OsStr` [INFO] [stdout] --> src/ch19/threads.rs:28:21 [INFO] [stdout] | [INFO] [stdout] 28 | assert_eq!(Some(OsStr::new("a.txt")), file); [INFO] [stdout] | ^^^^^ use of undeclared type `OsStr` [INFO] [stdout] | [INFO] [stdout] help: consider importing this struct [INFO] [stdout] | [INFO] [stdout] 2 + use std::ffi::OsStr; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `inferred_type` is never read [INFO] [stdout] --> src/ch2/num_type.rs:5:13 [INFO] [stdout] | [INFO] [stdout] 5 | let mut inferred_type = 12; // 根据下一行的赋值推断为 i64 类型 [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust_example` (lib test) due to 21 previous errors; 3 warnings emitted [INFO] [stdout] warning: value assigned to `mut_able` is never read [INFO] [stdout] --> src/ch2/num_type.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | let mut mut_able = 12; // Mutable `i32` [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable pattern [INFO] [stdout] --> src/ch8/ifs.rs:75:9 [INFO] [stdout] | [INFO] [stdout] 71 | value => { [INFO] [stdout] | ----- matches any value [INFO] [stdout] ... [INFO] [stdout] 75 | _ => 0, [INFO] [stdout] | ^ no value can reach this [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_patterns)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 20 previous errors; 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0412, E0422, E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0412`. [INFO] [stdout] [INFO] [stderr] error: failed to migrate to next edition [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `cargo fix --edition --allow-no-vcs --allow-dirty --frozen --all --all-targets --message-format=json` (exit status: 101) [INFO] running `Command { std: "docker" "inspect" "7169d70f0911deae7f79354df87811bc40d6331e2407ac0d009d4b115cb30612", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "7169d70f0911deae7f79354df87811bc40d6331e2407ac0d009d4b115cb30612", kill_on_drop: false }` [INFO] [stdout] 7169d70f0911deae7f79354df87811bc40d6331e2407ac0d009d4b115cb30612