[INFO] cloning repository https://github.com/zhaomo08/rust_learn [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/zhaomo08/rust_learn" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzhaomo08%2Frust_learn", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzhaomo08%2Frust_learn'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] d80bc25d46cd0a223e957f493140d819f5a309e3 [INFO] checking zhaomo08/rust_learn against master#9d28fe39763974a96d61232e96ac856735e4cdd6 for pr-139624 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fzhaomo08%2Frust_learn" "/workspace/builds/worker-3-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/zhaomo08/rust_learn on toolchain 9d28fe39763974a96d61232e96ac856735e4cdd6 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+9d28fe39763974a96d61232e96ac856735e4cdd6" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/zhaomo08/rust_learn [INFO] finished tweaking git repo https://github.com/zhaomo08/rust_learn [INFO] tweaked toml for git repo https://github.com/zhaomo08/rust_learn written to /workspace/builds/worker-3-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/zhaomo08/rust_learn 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" "+9d28fe39763974a96d61232e96ac856735e4cdd6" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+9d28fe39763974a96d61232e96ac856735e4cdd6" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b85bd926c7a88aa077fd7d80ddfbbf68b5581db0d138ab49c4387fc118f1e143 [INFO] running `Command { std: "docker" "start" "-a" "b85bd926c7a88aa077fd7d80ddfbbf68b5581db0d138ab49c4387fc118f1e143", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b85bd926c7a88aa077fd7d80ddfbbf68b5581db0d138ab49c4387fc118f1e143", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b85bd926c7a88aa077fd7d80ddfbbf68b5581db0d138ab49c4387fc118f1e143", kill_on_drop: false }` [INFO] [stdout] b85bd926c7a88aa077fd7d80ddfbbf68b5581db0d138ab49c4387fc118f1e143 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+9d28fe39763974a96d61232e96ac856735e4cdd6" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 9c95161da06ada087e9109667a6f4c1673553142db3e4eb196598885c1f2ad99 [INFO] running `Command { std: "docker" "start" "-a" "9c95161da06ada087e9109667a6f4c1673553142db3e4eb196598885c1f2ad99", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.153 [INFO] [stderr] Checking cfg-if v1.0.0 [INFO] [stderr] Checking ppv-lite86 v0.2.17 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking RUST_LEARN v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `std::future` [INFO] [stdout] --> src/bin/system-time.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::future; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::sleep` [INFO] [stdout] --> src/bin/system-time.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `core::slice` [INFO] [stdout] --> src/bin/main.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use core::slice; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::net::IpAddr` [INFO] [stdout] --> src/bin/main.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use std::net::IpAddr; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `index` [INFO] [stdout] --> src/bin/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let index= "5".parse::().unwrap(); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_index` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `unit` [INFO] [stdout] --> src/bin/main.rs:109:9 [INFO] [stdout] | [INFO] [stdout] 109 | let unit = Unit; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_unit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/main.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | let a = if cond { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `IPV6` is never constructed [INFO] [stdout] --> src/bin/main.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 12 | enum IPAddr { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 13 | IPv4(u8,u8,u8,u8), [INFO] [stdout] 14 | IPV6(u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8,u8) [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `Number` is never constructed [INFO] [stdout] --> src/bin/main.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 17 | enum Symbol { [INFO] [stdout] | ------ variant in this enum [INFO] [stdout] 18 | Char(char), [INFO] [stdout] 19 | Number, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `1` is never read [INFO] [stdout] --> src/bin/main.rs:83:23 [INFO] [stdout] | [INFO] [stdout] 83 | struct Pair(i32, f32); [INFO] [stdout] | ---- ^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::future` [INFO] [stdout] --> src/bin/system-time.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::future; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::thread::sleep` [INFO] [stdout] --> src/bin/system-time.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use std::thread::sleep; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> src/bin/panic.rs:1:8 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_a` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> src/bin/panic.rs:1:15 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `add` is never used [INFO] [stdout] --> src/bin/panic.rs:1:4 [INFO] [stdout] | [INFO] [stdout] 1 | fn add(a: u32,b:u32) ->u32{ [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/bin/ownership.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s2: String; [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: `s2` [INFO] [stdout] --> src/bin/ownership.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/bin/main2.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 2 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 3 | x :u64, [INFO] [stdout] 4 | y :u64, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused `Result` that must be used [INFO] [stdout] --> src/bin/function.rs:14:4 [INFO] [stdout] | [INFO] [stdout] 14 | / thread::spawn(move || { [INFO] [stdout] 15 | | println!("{}",hello_message); [INFO] [stdout] 16 | | }).join(); [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)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 14 | let _ = thread::spawn(move || { [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `s1` [INFO] [stdout] --> src/bin/ownership.rs:7:23 [INFO] [stdout] | [INFO] [stdout] 5 | let s1 = String::from("Hello World"); [INFO] [stdout] | -- move occurs because `s1` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 6 | let s2 = s1; [INFO] [stdout] | -- value moved here [INFO] [stdout] 7 | println!("{}",s1); [INFO] [stdout] | ^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 6 | let s2 = s1.clone(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `zero_one` [INFO] [stdout] --> src/bin/Rc.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let zero_one = List::Cons(0,Rc::new(List::Cons(1, four.clone()))); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_zero_one` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `two_three` [INFO] [stdout] --> src/bin/Rc.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let two_three = List::Cons(2,Rc::new(List::Cons(3, four))); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_two_three` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `RUST_LEARN` (bin "ownership") due to 1 previous error; 2 warnings emitted [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/bin/Rc.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | Cons(i32,Rc), [INFO] [stdout] | ---- ^^^ ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 9 - Cons(i32,Rc), [INFO] [stdout] 9 + Cons((),()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unused variable: `a_box` [INFO] [stdout] --> src/bin/box.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let a_box = Box::new(a); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a_box` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_box` [INFO] [stdout] --> src/bin/box.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let a_box = Box::new([0;1023 * 512]); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a_box` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/box.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let f = std::fs::read("/tmp/not_exist")?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `zero_one` [INFO] [stdout] --> src/bin/Rc.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let zero_one = List::Cons(0,Rc::new(List::Cons(1, four.clone()))); [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_zero_one` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `two_three` [INFO] [stdout] --> src/bin/Rc.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let two_three = List::Cons(2,Rc::new(List::Cons(3, four))); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_two_three` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `0` and `1` are never read [INFO] [stdout] --> src/bin/Rc.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | Cons(i32,Rc), [INFO] [stdout] | ---- ^^^ ^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | fields in this variant [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 9 - Cons(i32,Rc), [INFO] [stdout] 9 + Cons((),()), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/bin/box.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MESSAGE` is never used [INFO] [stdout] --> src/bin/mod.rs:2:16 [INFO] [stdout] | [INFO] [stdout] 2 | pub const MESSAGE: &str = "Hello World"; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/bin/super_self.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::f32::consts::E` [INFO] [stdout] --> src/bin/can_fix.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use std::f32::consts::E; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `y` is never read [INFO] [stdout] --> src/bin/main2.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 2 | struct Point { [INFO] [stdout] | ----- field in this struct [INFO] [stdout] 3 | x :u64, [INFO] [stdout] 4 | y :u64, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `Point` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_box` [INFO] [stdout] --> src/bin/box.rs:19:9 [INFO] [stdout] | [INFO] [stdout] 19 | let a_box = Box::new(a); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a_box` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a_box` [INFO] [stdout] --> src/bin/box.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | let a_box = Box::new([0;1023 * 512]); [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_a_box` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> src/bin/box.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | let f = std::fs::read("/tmp/not_exist")?; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enum `List` is never used [INFO] [stdout] --> src/bin/box.rs:11:6 [INFO] [stdout] | [INFO] [stdout] 11 | enum List { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `x` is never used [INFO] [stdout] --> src/bin/struct_generic_three.rs:16:8 [INFO] [stdout] | [INFO] [stdout] 6 | impl Point { [INFO] [stdout] | ---------------------------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | fn x(&self) -> &T { [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `function` is never used [INFO] [stdout] --> src/bin/super_self.rs:10:16 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `y` and `z` are never read [INFO] [stdout] --> src/bin/struct_generic.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 1 | struct Point{ [INFO] [stdout] | ----- fields in this struct [INFO] [stdout] 2 | x: T, [INFO] [stdout] 3 | y: T, [INFO] [stdout] | ^ [INFO] [stdout] 4 | z: U, [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `s2` [INFO] [stdout] --> src/bin/ownership.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | let s2: String; [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: `s2` [INFO] [stdout] --> src/bin/ownership.rs:6:13 [INFO] [stdout] | [INFO] [stdout] 6 | let s2 = s1; [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_s2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `s1` [INFO] [stdout] --> src/bin/ownership.rs:7:23 [INFO] [stdout] | [INFO] [stdout] 5 | let s1 = String::from("Hello World"); [INFO] [stdout] | -- move occurs because `s1` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 6 | let s2 = s1; [INFO] [stdout] | -- value moved here [INFO] [stdout] 7 | println!("{}",s1); [INFO] [stdout] | ^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 6 | let s2 = s1.clone(); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0382`. [INFO] [stdout] [INFO] [stderr] error: could not compile `RUST_LEARN` (bin "ownership" test) due to 1 previous error; 2 warnings emitted [INFO] [stdout] error[E0499]: cannot borrow `s` as mutable more than once at a time [INFO] [stdout] --> src/bin/borrow.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 9 | let s1_ref = &mut s; [INFO] [stdout] | ------ first mutable borrow occurs here [INFO] [stdout] 10 | let s2_ref = &mut s; [INFO] [stdout] | ^^^^^^ second mutable borrow occurs here [INFO] [stdout] ... [INFO] [stdout] 13 | println!("{}",s1_ref); [INFO] [stdout] | ------ first borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0499`. [INFO] [stdout] [INFO] [stderr] error: could not compile `RUST_LEARN` (bin "borrow" test) due to 1 previous error [INFO] running `Command { std: "docker" "inspect" "9c95161da06ada087e9109667a6f4c1673553142db3e4eb196598885c1f2ad99", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9c95161da06ada087e9109667a6f4c1673553142db3e4eb196598885c1f2ad99", kill_on_drop: false }` [INFO] [stdout] 9c95161da06ada087e9109667a6f4c1673553142db3e4eb196598885c1f2ad99