[INFO] cloning repository https://github.com/PhamDucLong90/RustBai2 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/PhamDucLong90/RustBai2" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPhamDucLong90%2FRustBai2", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPhamDucLong90%2FRustBai2'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8b6864f2332c1198020963d35f902a5684735baf [INFO] checking PhamDucLong90/RustBai2 against try#6619027b13a87a3597115f2c8231f107bf3a7a5f for pr-139624 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FPhamDucLong90%2FRustBai2" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/PhamDucLong90/RustBai2 on toolchain 6619027b13a87a3597115f2c8231f107bf3a7a5f [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+6619027b13a87a3597115f2c8231f107bf3a7a5f" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/PhamDucLong90/RustBai2 [INFO] removed 0 missing tests [INFO] finished tweaking git repo https://github.com/PhamDucLong90/RustBai2 [INFO] tweaked toml for git repo https://github.com/PhamDucLong90/RustBai2 written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/PhamDucLong90/RustBai2 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" "+6619027b13a87a3597115f2c8231f107bf3a7a5f" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+6619027b13a87a3597115f2c8231f107bf3a7a5f" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 316ea5f3cf9fd3edef7a66c06025af49a7a19d62b55db6defca9c1e0a3a5e857 [INFO] running `Command { std: "docker" "start" "-a" "316ea5f3cf9fd3edef7a66c06025af49a7a19d62b55db6defca9c1e0a3a5e857", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "316ea5f3cf9fd3edef7a66c06025af49a7a19d62b55db6defca9c1e0a3a5e857", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "316ea5f3cf9fd3edef7a66c06025af49a7a19d62b55db6defca9c1e0a3a5e857", kill_on_drop: false }` [INFO] [stdout] 316ea5f3cf9fd3edef7a66c06025af49a7a19d62b55db6defca9c1e0a3a5e857 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+6619027b13a87a3597115f2c8231f107bf3a7a5f" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 581522d369e272e5b84afcf5f8f3388ab0771365b3ffea5f975ebfd090e33b55 [INFO] running `Command { std: "docker" "start" "-a" "581522d369e272e5b84afcf5f8f3388ab0771365b3ffea5f975ebfd090e33b55", kill_on_drop: false }` [INFO] [stderr] Checking Rust-Bootcamp-2023 v0.1.0 (/opt/rustwide/workdir) [INFO] [stderr] Checking basic-of-rust v0.1.0 (/opt/rustwide/workdir/exercises/basic-of-rust) [INFO] [stderr] Checking ownership-borrowing v0.1.0 (/opt/rustwide/workdir/exercises/ownership-borrowing) [INFO] [stdout] error: expected one of `:`, `@`, or `|`, found `,` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(x, y: i32) { [INFO] [stdout] | ^ expected one of `:`, `@`, or `|` [INFO] [stdout] | [INFO] [stdout] = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) [INFO] [stdout] help: if this is a `self` type, give it a parameter name [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(self: x, y: i32) { [INFO] [stdout] | +++++ [INFO] [stdout] help: if this is a parameter name, give it a type [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(x: TypeName, y: i32) { [INFO] [stdout] | ++++++++++ [INFO] [stdout] help: if this is a type, explicitly ignore the parameter name [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(_: x, y: i32) { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `:`, `@`, or `|`, found `,` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(x, y: i32) { [INFO] [stdout] | ^ expected one of `:`, `@`, or `|` [INFO] [stdout] | [INFO] [stdout] = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) [INFO] [stdout] help: if this is a `self` type, give it a parameter name [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(self: x, y: i32) { [INFO] [stdout] | +++++ [INFO] [stdout] help: if this is a parameter name, give it a type [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(x: TypeName, y: i32) { [INFO] [stdout] | ++++++++++ [INFO] [stdout] help: if this is a type, explicitly ignore the parameter name [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(_: x, y: i32) { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `:`, `@`, or `|`, found `,` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(x, y: i32) { [INFO] [stdout] | ^ expected one of `:`, `@`, or `|` [INFO] [stdout] | [INFO] [stdout] = note: anonymous parameters are removed in the 2018 edition (see RFC 1685) [INFO] [stdout] help: if this is a `self` type, give it a parameter name [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(self: x, y: i32) { [INFO] [stdout] | +++++ [INFO] [stdout] help: if this is a parameter name, give it a type [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(x: TypeName, y: i32) { [INFO] [stdout] | ++++++++++ [INFO] [stdout] help: if this is a type, explicitly ignore the parameter name [INFO] [stdout] | [INFO] [stdout] 3 | fn sum(_: x, y: i32) { [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `string_value` in this scope [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:58:43 [INFO] [stdout] | [INFO] [stdout] 58 | let str_ref: &'static str = Box::leak(string_value.into_boxed_str()); // Obtain a reference to the String [INFO] [stdout] | ^^^^^^^^^^^^ help: a local variable with a similar name exists: `str_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let y = &x; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let z = &x; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `count` [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 40 | let count = 9; [INFO] [stdout] | ----- first assignment to `count` [INFO] [stdout] ... [INFO] [stdout] 50 | count -= 1; [INFO] [stdout] | ^^^^^^^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 40 | let mut count = 9; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `s` does not live long enough [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:93:31 [INFO] [stdout] | [INFO] [stdout] 91 | let s = line.unwrap(); [INFO] [stdout] | - binding `s` declared here [INFO] [stdout] 92 | [INFO] [stdout] 93 | let data: Vec<&str> = s.split("\t").collect(); [INFO] [stdout] | ^ borrowed value does not live long enough [INFO] [stdout] 94 | if prev_key.len() == 0 { [INFO] [stdout] | -------- borrow later used here [INFO] [stdout] ... [INFO] [stdout] 97 | } [INFO] [stdout] | - `s` dropped here while still borrowed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `chars` does not live long enough [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:106:43 [INFO] [stdout] | [INFO] [stdout] 105 | let chars = [b'x', b'y', b'z']; [INFO] [stdout] | ----- binding `chars` declared here [INFO] [stdout] 106 | let s: &str = std::str::from_utf8(&chars).unwrap(); [INFO] [stdout] | ^^^^^^ borrowed value does not live long enough [INFO] [stdout] 107 | v.push(&s); [INFO] [stdout] 108 | } [INFO] [stdout] | - `chars` dropped here while still borrowed [INFO] [stdout] 109 | println!("{:?}", v); [INFO] [stdout] | - borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `add_input` does not live long enough [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:124:34 [INFO] [stdout] | [INFO] [stdout] 118 | let mut add_input = String::from(""); [INFO] [stdout] | ------------- binding `add_input` declared here [INFO] [stdout] ... [INFO] [stdout] 124 | let add_vec: Vec<&str> = add_input.trim()[..].split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ borrowed value does not live long enough [INFO] [stdout] ... [INFO] [stdout] 132 | accounting.push(person); [INFO] [stdout] | ---------- borrow later used here [INFO] [stdout] 133 | } [INFO] [stdout] | - `add_input` dropped here while still borrowed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0384, E0425, E0597. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0384`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn foo_if_fizz(fizzish: &str) -> &str { [INFO] [stdout] | ---- expected `&str` because of return type [INFO] [stdout] ... [INFO] [stdout] 26 | 1 [INFO] [stdout] | ^ expected `&str`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `ownership-borrowing` (lib) due to 5 previous errors; 2 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn foo_if_fizz(fizzish: &str) -> &str { [INFO] [stdout] | ---- expected `&str` because of return type [INFO] [stdout] ... [INFO] [stdout] 26 | 1 [INFO] [stdout] | ^ expected `&str`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | s.push(" world"); [INFO] [stdout] | ---- ^^^^^^^^ expected `char`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/6619027b13a87a3597115f2c8231f107bf3a7a5f/library/alloc/src/string.rs:1403:12 [INFO] [stdout] help: you might have meant to use `push_str` [INFO] [stdout] | [INFO] [stdout] 12 | s.push_str(" world"); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `u32` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:77:35 [INFO] [stdout] | [INFO] [stdout] 77 | let result = check_number(-5); [INFO] [stdout] | ^^ cannot apply unary operator `-` [INFO] [stdout] | [INFO] [stdout] = note: unsigned values cannot be negated [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn bigger(a: i32, b: i32) -> i32 { [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] --> exercises/basic-of-rust/src/conditions.rs:6:23 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn bigger(a: i32, b: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | s.push(" world"); [INFO] [stdout] | ---- ^^^^^^^^ expected `char`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/6619027b13a87a3597115f2c8231f107bf3a7a5f/library/alloc/src/string.rs:1403:12 [INFO] [stdout] help: you might have meant to use `push_str` [INFO] [stdout] | [INFO] [stdout] 12 | s.push_str(" world"); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | fn check_number(number: u32) -> &'static str { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `year` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | fn is_leap_year(year: i32) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_year` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:26:9 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn foo_if_fizz(fizzish: &str) -> &str { [INFO] [stdout] | ---- expected `&str` because of return type [INFO] [stdout] ... [INFO] [stdout] 26 | 1 [INFO] [stdout] | ^ expected `&str`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:40:14 [INFO] [stdout] | [INFO] [stdout] 40 | fn factorial(n: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | fn is_prime(n: u32) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | assert_eq!(s, 3); [INFO] [stdout] | ^ expected `()`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `string_value` in this scope [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:58:43 [INFO] [stdout] | [INFO] [stdout] 58 | let str_ref: &'static str = Box::leak(string_value.into_boxed_str()); // Obtain a reference to the String [INFO] [stdout] | ^^^^^^^^^^^^ help: a local variable with a similar name exists: `str_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn sum_one_to_n(n: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `numbers` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:21:22 [INFO] [stdout] | [INFO] [stdout] 21 | fn calculate_average(numbers: &[f64]) -> f64 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `numbers` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | fn sum_even_numbers(numbers: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0600]: cannot apply unary operator `-` to type `u32` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:77:35 [INFO] [stdout] | [INFO] [stdout] 77 | let result = check_number(-5); [INFO] [stdout] | ^^ cannot apply unary operator `-` [INFO] [stdout] | [INFO] [stdout] = note: unsigned values cannot be negated [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | s += "!".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected `&str`, found `String` [INFO] [stdout] | [INFO] [stdout] help: try removing the method call [INFO] [stdout] | [INFO] [stdout] 13 - s += "!".to_string(); [INFO] [stdout] 13 + s += "!"; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:12:12 [INFO] [stdout] | [INFO] [stdout] 12 | s.push(" world"); [INFO] [stdout] | ---- ^^^^^^^^ expected `char`, found `&str` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/6619027b13a87a3597115f2c8231f107bf3a7a5f/library/alloc/src/string.rs:1403:12 [INFO] [stdout] help: you might have meant to use `push_str` [INFO] [stdout] | [INFO] [stdout] 12 | s.push_str(" world"); [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | let s3 = s1 + s2; [INFO] [stdout] | ^^ expected `&str`, found `String` [INFO] [stdout] | [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 21 | let s3 = s1 + &s2; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn bigger(a: i32, b: i32) -> i32 { [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] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | s += "!".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected `&str`, found `String` [INFO] [stdout] | [INFO] [stdout] help: try removing the method call [INFO] [stdout] | [INFO] [stdout] 13 - s += "!".to_string(); [INFO] [stdout] 13 + s += "!"; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0600. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | let s3 = s1 + s2; [INFO] [stdout] | ^^ expected `&str`, found `String` [INFO] [stdout] | [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 21 | let s3 = s1 + &s2; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `b` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:6:23 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn bigger(a: i32, b: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | fn check_number(number: u32) -> &'static str { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `year` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | fn is_leap_year(year: i32) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_year` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:40:14 [INFO] [stdout] | [INFO] [stdout] 40 | fn factorial(n: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | fn is_prime(n: u32) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `color` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:3:14 [INFO] [stdout] | [INFO] [stdout] 3 | fn exercise1(color: &str) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_color` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:28:19 [INFO] [stdout] | [INFO] [stdout] 28 | fn reverse_string(input: &str) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:35:18 [INFO] [stdout] | [INFO] [stdout] 35 | fn is_palindrome(word: &str) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | fn count_char_occurrences(string: &str, ch: char) -> usize { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:41:41 [INFO] [stdout] | [INFO] [stdout] 41 | fn count_char_occurrences(string: &str, ch: char) -> usize { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn sum_one_to_n(n: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `numbers` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:21:22 [INFO] [stdout] | [INFO] [stdout] 21 | fn calculate_average(numbers: &[f64]) -> f64 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `numbers` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | fn sum_even_numbers(numbers: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:13:10 [INFO] [stdout] | [INFO] [stdout] 13 | s += "!".to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^^^ expected `&str`, found `String` [INFO] [stdout] | [INFO] [stdout] help: try removing the method call [INFO] [stdout] | [INFO] [stdout] 13 - s += "!".to_string(); [INFO] [stdout] 13 + s += "!"; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | let s3 = s1 + s2; [INFO] [stdout] | ^^ expected `&str`, found `String` [INFO] [stdout] | [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 21 | let s3 = s1 + &s2; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `color` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:3:14 [INFO] [stdout] | [INFO] [stdout] 3 | fn exercise1(color: &str) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_color` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:28:19 [INFO] [stdout] | [INFO] [stdout] 28 | fn reverse_string(input: &str) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `Rust-Bootcamp-2023` (test "conditions") due to 2 previous errors; 6 warnings emitted [INFO] [stderr] error: could not compile `Rust-Bootcamp-2023` (test "functions") due to 2 previous errors; 3 warnings emitted [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:42:23 [INFO] [stdout] | [INFO] [stdout] 42 | assert_eq!(s, 3); [INFO] [stdout] | ^ expected `()`, found integer [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:35:18 [INFO] [stdout] | [INFO] [stdout] 35 | fn is_palindrome(word: &str) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | fn count_char_occurrences(string: &str, ch: char) -> usize { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:41:41 [INFO] [stdout] | [INFO] [stdout] 41 | fn count_char_occurrences(string: &str, ch: char) -> usize { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let y = &x; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `a` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:6:15 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn bigger(a: i32, b: i32) -> i32 { [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] --> exercises/basic-of-rust/src/conditions.rs:6:23 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn bigger(a: i32, b: i32) -> i32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `number` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:14:17 [INFO] [stdout] | [INFO] [stdout] 14 | fn check_number(number: u32) -> &'static str { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_number` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `year` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:33:17 [INFO] [stdout] | [INFO] [stdout] 33 | fn is_leap_year(year: i32) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_year` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:40:14 [INFO] [stdout] | [INFO] [stdout] 40 | fn factorial(n: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `z` [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | let z = &x; [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_z` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/conditions.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | fn is_prime(n: u32) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0384]: cannot assign twice to immutable variable `count` [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:50:9 [INFO] [stdout] | [INFO] [stdout] 40 | let count = 9; [INFO] [stdout] | ----- first assignment to `count` [INFO] [stdout] ... [INFO] [stdout] 50 | count -= 1; [INFO] [stdout] | ^^^^^^^^^^ cannot assign twice to immutable variable [INFO] [stdout] | [INFO] [stdout] help: consider making this binding mutable [INFO] [stdout] | [INFO] [stdout] 40 | let mut count = 9; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `s` does not live long enough [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:93:31 [INFO] [stdout] | [INFO] [stdout] 91 | let s = line.unwrap(); [INFO] [stdout] | - binding `s` declared here [INFO] [stdout] 92 | [INFO] [stdout] 93 | let data: Vec<&str> = s.split("\t").collect(); [INFO] [stdout] | ^ borrowed value does not live long enough [INFO] [stdout] 94 | if prev_key.len() == 0 { [INFO] [stdout] | -------- borrow later used here [INFO] [stdout] ... [INFO] [stdout] 97 | } [INFO] [stdout] | - `s` dropped here while still borrowed [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `chars` does not live long enough [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:106:43 [INFO] [stdout] | [INFO] [stdout] 105 | let chars = [b'x', b'y', b'z']; [INFO] [stdout] | ----- binding `chars` declared here [INFO] [stdout] 106 | let s: &str = std::str::from_utf8(&chars).unwrap(); [INFO] [stdout] | ^^^^^^ borrowed value does not live long enough [INFO] [stdout] 107 | v.push(&s); [INFO] [stdout] 108 | } [INFO] [stdout] | - `chars` dropped here while still borrowed [INFO] [stdout] 109 | println!("{:?}", v); [INFO] [stdout] | - borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `color` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:3:14 [INFO] [stdout] | [INFO] [stdout] 3 | fn exercise1(color: &str) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_color` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `input` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:28:19 [INFO] [stdout] | [INFO] [stdout] 28 | fn reverse_string(input: &str) -> String { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_input` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `word` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:35:18 [INFO] [stdout] | [INFO] [stdout] 35 | fn is_palindrome(word: &str) -> bool { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_word` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `string` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:41:27 [INFO] [stdout] | [INFO] [stdout] 41 | fn count_char_occurrences(string: &str, ch: char) -> usize { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_string` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `ch` [INFO] [stdout] --> exercises/basic-of-rust/src/strings.rs:41:41 [INFO] [stdout] | [INFO] [stdout] 41 | fn count_char_occurrences(string: &str, ch: char) -> usize { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_ch` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `add_input` does not live long enough [INFO] [stdout] --> exercises/ownership-borrowing/src/lib.rs:124:34 [INFO] [stdout] | [INFO] [stdout] 118 | let mut add_input = String::from(""); [INFO] [stdout] | ------------- binding `add_input` declared here [INFO] [stdout] ... [INFO] [stdout] 124 | let add_vec: Vec<&str> = add_input.trim()[..].split_whitespace().collect(); [INFO] [stdout] | ^^^^^^^^^ borrowed value does not live long enough [INFO] [stdout] ... [INFO] [stdout] 132 | accounting.push(person); [INFO] [stdout] | ---------- borrow later used here [INFO] [stdout] 133 | } [INFO] [stdout] | - `add_input` dropped here while still borrowed [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `basic-of-rust` (lib) due to 5 previous errors; 14 warnings emitted [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn sum_one_to_n(n: u32) -> u32 { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0384, E0425, E0597. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0384`. [INFO] [stdout] [INFO] [stdout] warning: unused variable: `numbers` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:21:22 [INFO] [stdout] | [INFO] [stdout] 21 | fn calculate_average(numbers: &[f64]) -> f64 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `numbers` [INFO] [stdout] --> exercises/basic-of-rust/src/functions.rs:27:21 [INFO] [stdout] | [INFO] [stdout] 27 | fn sum_even_numbers(numbers: &[i32]) -> i32 { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `Rust-Bootcamp-2023` (test "strings") due to 3 previous errors; 5 warnings emitted [INFO] [stdout] Some errors have detailed explanations: E0308, E0600. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `ownership-borrowing` (lib test) due to 5 previous errors; 2 warnings emitted [INFO] [stderr] error: could not compile `basic-of-rust` (lib test) due to 7 previous errors; 14 warnings emitted [INFO] running `Command { std: "docker" "inspect" "581522d369e272e5b84afcf5f8f3388ab0771365b3ffea5f975ebfd090e33b55", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "581522d369e272e5b84afcf5f8f3388ab0771365b3ffea5f975ebfd090e33b55", kill_on_drop: false }` [INFO] [stdout] 581522d369e272e5b84afcf5f8f3388ab0771365b3ffea5f975ebfd090e33b55