[INFO] cloning repository https://github.com/loic-rouzaud/exercices_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/loic-rouzaud/exercices_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Floic-rouzaud%2Fexercices_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Floic-rouzaud%2Fexercices_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] f51cbb47ea92dad8bd7d8c3653d1429cfd9e1da1 [INFO] testing loic-rouzaud/exercices_rust against try#db823df02fd0c2cf67b43025ac3fef3f2d743245 for pr-150681 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Floic-rouzaud%2Fexercices_rust" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/loic-rouzaud/exercices_rust [INFO] finished tweaking git repo https://github.com/loic-rouzaud/exercices_rust [INFO] tweaked toml for git repo https://github.com/loic-rouzaud/exercices_rust written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/loic-rouzaud/exercices_rust on toolchain db823df02fd0c2cf67b43025ac3fef3f2d743245 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/loic-rouzaud/exercices_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" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [ERROR] error running command: no output for 300 seconds [INFO] testing loic-rouzaud/exercices_rust against try#db823df02fd0c2cf67b43025ac3fef3f2d743245 for pr-150681 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Floic-rouzaud%2Fexercices_rust" "/workspace/builds/worker-4-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc2/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/loic-rouzaud/exercices_rust [INFO] finished tweaking git repo https://github.com/loic-rouzaud/exercices_rust [INFO] tweaked toml for git repo https://github.com/loic-rouzaud/exercices_rust written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/loic-rouzaud/exercices_rust on toolchain db823df02fd0c2cf67b43025ac3fef3f2d743245 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/loic-rouzaud/exercices_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" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "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:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 23b285f6222abd31ae228e727a6d8015a597902cfcb74a12c25287f52e5225ff [INFO] running `Command { std: "docker" "start" "-a" "23b285f6222abd31ae228e727a6d8015a597902cfcb74a12c25287f52e5225ff", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "23b285f6222abd31ae228e727a6d8015a597902cfcb74a12c25287f52e5225ff", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "23b285f6222abd31ae228e727a6d8015a597902cfcb74a12c25287f52e5225ff", kill_on_drop: false }` [INFO] [stdout] 23b285f6222abd31ae228e727a6d8015a597902cfcb74a12c25287f52e5225ff [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:845e597a41426bbf2703be69acdb67d10b6de511142d05cba7bbe119c898b2c7" "/opt/rustwide/cargo-home/bin/cargo" "+db823df02fd0c2cf67b43025ac3fef3f2d743245" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 16f40ce8d8c526342ac12550159557204999345d69fdf99dfafe5fb1fb9862d6 [INFO] running `Command { std: "docker" "start" "-a" "16f40ce8d8c526342ac12550159557204999345d69fdf99dfafe5fb1fb9862d6", kill_on_drop: false }` [INFO] [stderr] Compiling exo-rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: missing `fn` or `struct` for function or struct definition [INFO] [stdout] --> src/exercices/day1/_03_functions/function1.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | todo()!; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: if you meant to call a macro, try [INFO] [stdout] | [INFO] [stdout] 2 | todo!()!; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: missing `fn` or `struct` for function or struct definition [INFO] [stdout] --> src/exercices/day1/_03_functions/function2.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | todo()!; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: if you meant to call a macro, try [INFO] [stdout] | [INFO] [stdout] 2 | todo!()!; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: missing `fn` or `struct` for function or struct definition [INFO] [stdout] --> src/exercices/day1/_03_functions/function3.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | todo()!; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] help: if you meant to call a macro, try [INFO] [stdout] | [INFO] [stdout] 2 | todo!()!; [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: macros that expand to items must be delimited with braces or followed by a semicolon [INFO] [stdout] --> src/exercices/day3/_11_traits/trait1.rs:21:10 [INFO] [stdout] | [INFO] [stdout] 21 | todo!() [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] help: change the delimiters to curly braces [INFO] [stdout] | [INFO] [stdout] 21 - todo!() [INFO] [stdout] 21 + todo!{} [INFO] [stdout] | [INFO] [stdout] help: add a semicolon [INFO] [stdout] | [INFO] [stdout] 21 | todo!(); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: macros that expand to items must be delimited with braces or followed by a semicolon [INFO] [stdout] --> src/exercices/day3/_11_traits/trait1.rs:28:10 [INFO] [stdout] | [INFO] [stdout] 28 | todo!() [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] help: change the delimiters to curly braces [INFO] [stdout] | [INFO] [stdout] 28 - todo!() [INFO] [stdout] 28 + todo!{} [INFO] [stdout] | [INFO] [stdout] help: add a semicolon [INFO] [stdout] | [INFO] [stdout] 28 | todo!(); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `!` or `::`, found `(` [INFO] [stdout] --> src/exercices/day3/_11_traits/trait1.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | todo!(); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected one of `!` or `::` [INFO] [stdout] | in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `!` or `::`, found `(` [INFO] [stdout] --> src/exercices/day3/_11_traits/trait1.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | todo!() [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected one of `!` or `::` [INFO] [stdout] | in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `!` or `::`, found `(` [INFO] [stdout] --> src/exercices/day3/_11_traits/trait1.rs:28:5 [INFO] [stdout] | [INFO] [stdout] 28 | todo!() [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | expected one of `!` or `::` [INFO] [stdout] | in this macro invocation [INFO] [stdout] | [INFO] [stdout] = note: this error originates in the macro `todo` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/exercices/day3/_13_life_cycle/life_cycle1.rs:3:42 [INFO] [stdout] | [INFO] [stdout] 3 | fn longest_string(s1: &str, s2: &str) -> &str { [INFO] [stdout] | ---- ---- ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] = help: this function's return type contains a borrowed value, but the signature does not say whether it is borrowed from `s1` or `s2` [INFO] [stdout] help: consider introducing a named lifetime parameter [INFO] [stdout] | [INFO] [stdout] 3 | fn longest_string<'a>(s1: &'a str, s2: &'a str) -> &'a str { [INFO] [stdout] | ++++ ++ ++ ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0106]: missing lifetime specifier [INFO] [stdout] --> src/exercices/day3/_13_life_cycle/life_cycle2.rs:4:11 [INFO] [stdout] | [INFO] [stdout] 4 | part: &str, [INFO] [stdout] | ^ expected named lifetime parameter [INFO] [stdout] | [INFO] [stdout] help: consider introducing a named lifetime parameter [INFO] [stdout] | [INFO] [stdout] 3 ~ struct TextImportant<'a> { [INFO] [stdout] 4 ~ part: &'a str, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find type `Pair` in this scope [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type2.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | impl Pair { [INFO] [stdout] | ^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] note: struct `crate::solutions::day4::_15_generics_types::generic_type2::Pair` exists but is inaccessible [INFO] [stdout] --> src/solutions/day4/_15_generics_types/generic_type2.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | struct Pair { [INFO] [stdout] | ^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Pair` [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type2.rs:28:23 [INFO] [stdout] | [INFO] [stdout] 28 | let mut numbers = Pair::new(5, 10); [INFO] [stdout] | ^^^^ use of undeclared type `Pair` [INFO] [stdout] | [INFO] [stdout] note: struct `crate::solutions::day4::_15_generics_types::generic_type2::Pair` exists but is inaccessible [INFO] [stdout] --> src/solutions/day4/_15_generics_types/generic_type2.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | struct Pair { [INFO] [stdout] | ^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: failed to resolve: use of undeclared type `Pair` [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type2.rs:37:17 [INFO] [stdout] | [INFO] [stdout] 37 | let words = Pair::new(String::from("Hello"), String::from("Rust")); [INFO] [stdout] | ^^^^ use of undeclared type `Pair` [INFO] [stdout] | [INFO] [stdout] note: struct `crate::solutions::day4::_15_generics_types::generic_type2::Pair` exists but is inaccessible [INFO] [stdout] --> src/solutions/day4/_15_generics_types/generic_type2.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | struct Pair { [INFO] [stdout] | ^^^^^^^^^^^^^^ not accessible [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::f64::consts::PI` [INFO] [stdout] --> src/exercices/day3/_11_traits/trait2.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::f64::consts::PI; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day1/_04_boucles/boucle2.rs:1:29 [INFO] [stdout] | [INFO] [stdout] 1 | fn sum_until(limit: i32) -> i32 { [INFO] [stdout] | --------- ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] help: consider returning the local binding `limit` [INFO] [stdout] | [INFO] [stdout] 1 | fn sum_until(limit: i32) -> i32 { [INFO] [stdout] 2 ~ limit [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day1/_04_boucles/boucle2.rs:10:25 [INFO] [stdout] | [INFO] [stdout] 10 | fn factorial(n: u32) -> u64 { [INFO] [stdout] | --------- ^^^ expected `u64`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day1/_04_boucles/boucle3.rs:1:24 [INFO] [stdout] | [INFO] [stdout] 1 | fn is_prime(n: u32) -> bool { [INFO] [stdout] | -------- ^^^^ expected `bool`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day1/_05_vectors/vector1.rs:1:42 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn sum_vector(numbers: &Vec) -> i32 { [INFO] [stdout] | ---------- ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_06_iteration/loop1.rs:14:50 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn sum_even_numbers(start: i32, end: i32) -> i32 { [INFO] [stdout] | ---------------- ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] note: consider returning one of these bindings [INFO] [stdout] --> src/exercices/day2/_06_iteration/loop1.rs:14:25 [INFO] [stdout] | [INFO] [stdout] 14 | pub fn sum_even_numbers(start: i32, end: i32) -> i32 { [INFO] [stdout] | ^^^^^ ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_06_iteration/loop1.rs:19:49 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn sum_even_numbers_cpy(numbers: &[i32]) -> i32 { [INFO] [stdout] | -------------------- ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_06_iteration/loop2.rs:1:66 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn process_strings(strings: Vec<&str>, min_lenght: usize) -> usize { [INFO] [stdout] | --------------- ^^^^^ expected `usize`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] help: consider returning the local binding `min_lenght` [INFO] [stdout] | [INFO] [stdout] 1 | pub fn process_strings(strings: Vec<&str>, min_lenght: usize) -> usize { [INFO] [stdout] 2 ~ min_lenght [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_06_iteration/loop3.rs:1:51 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn square_roots_of_even(numbers: Vec) -> Vec { [INFO] [stdout] | -------------------- ^^^^^^^^ expected `Vec`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_06_iteration/loop4.rs:1:46 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn unique_words(sentences: Vec<&str>) -> Vec { [INFO] [stdout] | ------------ ^^^^^^^^^^^ expected `Vec`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_06_iteration/loop5.rs:1:44 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn to_uppercase(strings: &[String]) -> Vec { [INFO] [stdout] | ------------ ^^^^^^^^^^^ expected `Vec`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_07_pattern_matching/pattern_matching1.rs:1:35 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn classify_number(n: i32) -> String { [INFO] [stdout] | --------------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_07_pattern_matching/pattern_matching2.rs:7:43 [INFO] [stdout] | [INFO] [stdout] 7 | pub fn get_action(light: TrafficLight) -> String { [INFO] [stdout] | ---------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_07_pattern_matching/pattern_matching3.rs:9:43 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn get_activity(weather: &Weather) -> String { [INFO] [stdout] | ------------ ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_08_strings/string1.rs:1:28 [INFO] [stdout] | [INFO] [stdout] 1 | fn trim_me(input: &str) -> &str { [INFO] [stdout] | ------- ^^^^ expected `&str`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] help: consider returning the local binding `input` [INFO] [stdout] | [INFO] [stdout] 1 | fn trim_me(input: &str) -> &str { [INFO] [stdout] 2 ~ input [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_08_strings/string1.rs:5:31 [INFO] [stdout] | [INFO] [stdout] 5 | fn compose_me(input: &str) -> String { [INFO] [stdout] | ---------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_08_strings/string1.rs:9:31 [INFO] [stdout] | [INFO] [stdout] 9 | fn replace_me(input: &str) -> String { [INFO] [stdout] | ---------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:19:19 [INFO] [stdout] | [INFO] [stdout] 19 | let result1 = placeholder("12345"); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | let result2 = placeholder("hello".to_string()); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | let result3 = placeholder(String::from("67890")); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:22:19 [INFO] [stdout] | [INFO] [stdout] 22 | let result4 = placeholder("rust is great!".to_owned()); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 23 | let result5 = placeholder("42".into()); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | let result6 = placeholder(format!("Number: {}", 7)); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:25:19 [INFO] [stdout] | [INFO] [stdout] 25 | let result7 = placeholder(&String::from("Hello World")[0..5]); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 26 | let result8 = placeholder(" abc123 ".trim()); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:27:19 [INFO] [stdout] | [INFO] [stdout] 27 | let result9 = placeholder("Programming is fun".replace("fun", "awesome")); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `placeholder` in this scope [INFO] [stdout] --> src/exercices/day2/_08_strings/string2.rs:28:20 [INFO] [stdout] | [INFO] [stdout] 28 | let result10 = placeholder("TEST".to_lowercase()); [INFO] [stdout] | ^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_08_strings/string3.rs:6:37 [INFO] [stdout] | [INFO] [stdout] 6 | pub fn to_uppercase(input: &str) -> String { [INFO] [stdout] | ------------ ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_08_strings/string3.rs:13:35 [INFO] [stdout] | [INFO] [stdout] 13 | pub fn first_five(input: &str) -> String { [INFO] [stdout] | ---------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_08_strings/string3.rs:19:43 [INFO] [stdout] | [INFO] [stdout] 19 | pub fn concatenate(s1: &str, s2: &str) -> String { [INFO] [stdout] | ----------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_09_hashmaps/hashmap1.rs:3:35 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn count_chars(text: &str) -> HashMap { [INFO] [stdout] | ----------- ^^^^^^^^^^^^^^^^^^^^ expected `HashMap`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `HashMap` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day2/_09_hashmaps/hashmap2.rs:3:38 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn word_frequency(text: &str) -> HashMap { [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^^^^^^^^^ expected `HashMap`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `HashMap` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/option1.rs:1:51 [INFO] [stdout] | [INFO] [stdout] 1 | fn find_first(items: &[T], predicate: F) -> Option<&T> [INFO] [stdout] | ---------- ^^^^^^^^^^ expected `Option<&T>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option<&T>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/option2.rs:1:54 [INFO] [stdout] | [INFO] [stdout] 1 | fn get_element(vec: &[T], index: usize) -> Option { [INFO] [stdout] | ----------- ^^^^^^^^^ expected `Option`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/result1.rs:8:30 [INFO] [stdout] | [INFO] [stdout] 8 | fn parse_age(input: &str) -> Result { [INFO] [stdout] | --------- ^^^^^^^^^^^^^^^^^^^^^^ expected `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/result2.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn parse_number(input: &str) -> Result { [INFO] [stdout] | ------------ ^^^^^^^^^^^^^^^^^^^ expected `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/result2.rs:7:39 [INFO] [stdout] | [INFO] [stdout] 7 | fn sum_strings(s1: &str, s2: &str) -> Result { [INFO] [stdout] | ----------- ^^^^^^^^^^^^^^^^^^^ expected `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/result3.rs:1:37 [INFO] [stdout] | [INFO] [stdout] 1 | fn safe_division(a: f64, b: f64) -> Result { [INFO] [stdout] | ------------- ^^^^^^^^^^^^^^^^^^^ expected `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/user_option.rs:12:37 [INFO] [stdout] | [INFO] [stdout] 12 | pub fn new(username: String) -> Self { [INFO] [stdout] | --- ^^^^ expected `User`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/user_option.rs:17:51 [INFO] [stdout] | [INFO] [stdout] 17 | pub fn with_email(mut self, email: String) -> Self { [INFO] [stdout] | ---------- ^^^^ expected `User`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] help: consider returning the local binding `self` [INFO] [stdout] | [INFO] [stdout] 17 | pub fn with_email(mut self, email: String) -> Self { [INFO] [stdout] 18 ~ self [INFO] [stdout] 19 ~ // TODO() : Implémenter la méthode with_email qui définit l'email de l'utilisateur [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/user_option.rs:22:43 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn with_age(mut self, age: u8) -> Self { [INFO] [stdout] | -------- ^^^^ expected `User`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] help: consider returning the local binding `self` [INFO] [stdout] | [INFO] [stdout] 22 | pub fn with_age(mut self, age: u8) -> Self { [INFO] [stdout] 23 ~ self [INFO] [stdout] 24 ~ // TODO() : Implémenter la méthode with_age qui définit l'âge de l'utilisateur [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/user_option.rs:27:39 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn get_contact_info(&self) -> String { [INFO] [stdout] | ---------------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day3/_14_error_handling/user_option.rs:33:31 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn is_adult(&self) -> Option { [INFO] [stdout] | -------- ^^^^^^^^^^^^ expected `Option`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Option` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 2 arguments were supplied [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type1.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | swap(&mut a, &mut b); [INFO] [stdout] | ^^^^ ------ ------ unexpected argument #2 of type `&mut {integer}` [INFO] [stdout] | | [INFO] [stdout] | unexpected argument #1 of type `&mut {integer}` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type1.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn swap(/* complétez les paramètres */) { [INFO] [stdout] | ^^^^ [INFO] [stdout] help: remove the extra arguments [INFO] [stdout] | [INFO] [stdout] 13 - swap(&mut a, &mut b); [INFO] [stdout] 13 + swap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 2 arguments were supplied [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type1.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 19 | swap(&mut s1, &mut s2); [INFO] [stdout] | ^^^^ ------- ------- unexpected argument #2 of type `&mut String` [INFO] [stdout] | | [INFO] [stdout] | unexpected argument #1 of type `&mut String` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type1.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn swap(/* complétez les paramètres */) { [INFO] [stdout] | ^^^^ [INFO] [stdout] help: remove the extra arguments [INFO] [stdout] | [INFO] [stdout] 19 - swap(&mut s1, &mut s2); [INFO] [stdout] 19 + swap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 2 arguments were supplied [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type1.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | swap(&mut flag1, &mut flag2); [INFO] [stdout] | ^^^^ ---------- ---------- unexpected argument #2 of type `&mut bool` [INFO] [stdout] | | [INFO] [stdout] | unexpected argument #1 of type `&mut bool` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type1.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn swap(/* complétez les paramètres */) { [INFO] [stdout] | ^^^^ [INFO] [stdout] help: remove the extra arguments [INFO] [stdout] | [INFO] [stdout] 25 - swap(&mut flag1, &mut flag2); [INFO] [stdout] 25 + swap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_15_generics_types/generic_type2.rs:22:28 [INFO] [stdout] | [INFO] [stdout] 22 | fn into_tuple(self) -> (T, T) { [INFO] [stdout] | ---------- ^^^^^^ expected `(T, T)`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected tuple `(T, T)` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/event_manager.rs:10:21 [INFO] [stdout] | [INFO] [stdout] 10 | pub fn new() -> Self { [INFO] [stdout] | --- ^^^^ expected `EventManager`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/event_manager.rs:34:55 [INFO] [stdout] | [INFO] [stdout] 34 | pub fn process_message(&self, message: String) -> Vec { [INFO] [stdout] | --------------- ^^^^^^^^^^^ expected `Vec`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/event_manager.rs:39:30 [INFO] [stdout] | [INFO] [stdout] 39 | pub fn shutdown(self) -> bool { [INFO] [stdout] | -------- ^^^^ expected `bool`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/cons_list.rs:13:36 [INFO] [stdout] | [INFO] [stdout] 13 | fn cons(x: T, list: List) -> List { [INFO] [stdout] | ---- ^^^^^^^ expected `List`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `exercices::day4::_17_box_pointers::cons_list::List` [INFO] [stdout] found unit type `()` [INFO] [stdout] help: consider returning the local binding `list` [INFO] [stdout] | [INFO] [stdout] 13 | fn cons(x: T, list: List) -> List { [INFO] [stdout] 14 ~ list [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/cons_list.rs:18:44 [INFO] [stdout] | [INFO] [stdout] 18 | pub fn create_list(elements: Vec) -> List { [INFO] [stdout] | ----------- ^^^^^^^ expected `List`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected enum `exercices::day4::_17_box_pointers::cons_list::List` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/cons_list.rs:23:57 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn display_cons_list(list: &List) -> String { [INFO] [stdout] | ----------------- ^^^^^^ expected `String`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/cons_list.rs:28:38 [INFO] [stdout] | [INFO] [stdout] 28 | pub fn sum_list(list: &List) -> i32 { [INFO] [stdout] | -------- ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_18_mutex_pointers/mutex.rs:4:28 [INFO] [stdout] | [INFO] [stdout] 4 | pub fn create_counter() -> Arc> { [INFO] [stdout] | -------------- ^^^^^^^^^^^^^^^ expected `Arc>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Arc>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_18_mutex_pointers/mutex.rs:9:72 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn increment_counter(counter: Arc>, increments: i32) -> thread::JoinHandle<()> { [INFO] [stdout] | ----------------- ^^^^^^^^^^^^^^^^^^^^^^ expected `JoinHandle<()>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `JoinHandle<()>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_19_rc_pointers/rc_shared_data.rs:3:36 [INFO] [stdout] | [INFO] [stdout] 3 | pub fn create_shared_resource() -> Rc> { [INFO] [stdout] | ---------------------- ^^^^^^^^^^^^ expected `Rc>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Rc>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_19_rc_pointers/rc_shared_data.rs:8:49 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn add_consumer(resource: &Rc>) -> usize { [INFO] [stdout] | ------------ ^^^^^ expected `usize`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_19_rc_pointers/rc_smart_pointer.rs:8:32 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn create_shared_data() -> (Rc, Rc, Rc) { [INFO] [stdout] | ------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(Rc, Rc, Rc)`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected tuple `(Rc, Rc, Rc)` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_20_refcell_pointer/refcell.rs:11:21 [INFO] [stdout] | [INFO] [stdout] 11 | pub fn new() -> Self { [INFO] [stdout] | --- ^^^^ expected `Logger`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_20_refcell_pointer/refcell.rs:21:31 [INFO] [stdout] | [INFO] [stdout] 21 | pub fn get_logs(&self) -> Vec { [INFO] [stdout] | -------- ^^^^^^^^^^^ expected `Vec`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/exercices/day5/_20_refcell_pointer/refcell.rs:31:98 [INFO] [stdout] | [INFO] [stdout] 31 | pub fn process_with_logging(&self, data: T, processor: impl Fn(T, &dyn Fn(&str)) -> T) -> T { [INFO] [stdout] | -------------------- - ^ expected type parameter `T`, found `()` [INFO] [stdout] | | | [INFO] [stdout] | | expected this type parameter [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] = note: expected type parameter `T` [INFO] [stdout] found unit type `()` [INFO] [stdout] help: consider returning the local binding `data` [INFO] [stdout] | [INFO] [stdout] 31 | pub fn process_with_logging(&self, data: T, processor: impl Fn(T, &dyn Fn(&str)) -> T) -> T { [INFO] [stdout] 32 ~ data [INFO] [stdout] 33 ~ // TODO() : Implémenter une fonction de traitement générique qui: [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/exercices/day1/_04_boucles/boucle1.rs:1:18 [INFO] [stdout] | [INFO] [stdout] 1 | fn print_numbers(n: i32) { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `numbers` [INFO] [stdout] --> src/exercices/day1/_05_vectors/vector1.rs:8:22 [INFO] [stdout] | [INFO] [stdout] 8 | pub fn double_vector(numbers: &mut Vec) { [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] --> src/exercices/day1/_05_vectors/vector2.rs:1:28 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn filter_even_numbers(numbers: &Vec) -> Vec { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_numbers` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vec1` [INFO] [stdout] --> src/exercices/day1/_05_vectors/vector2.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn merge_vectors(vec1: &Vec, vec2: &Vec) -> Vec { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_vec1` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `vec2` [INFO] [stdout] --> src/exercices/day1/_05_vectors/vector2.rs:9:39 [INFO] [stdout] | [INFO] [stdout] 9 | pub fn merge_vectors(vec1: &Vec, vec2: &Vec) -> Vec { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_vec2` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `shape` [INFO] [stdout] --> src/exercices/day3/_11_traits/trait2.rs:49:32 [INFO] [stdout] | [INFO] [stdout] 49 | pub fn analyze_shape(shape: &T) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_shape` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `vec` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/exercices/day3/_12_ownership/ownership1.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | vec.push(88); [INFO] [stdout] | ^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 4 | let mut vec = vec; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0596]: cannot borrow `vec` as mutable, as it is not declared as mutable [INFO] [stdout] --> src/exercices/day3/_12_ownership/ownership2.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | vec.push(88); [INFO] [stdout] | ^^^ cannot borrow as mutable [INFO] [stdout] | [INFO] [stdout] help: consider changing this to be mutable [INFO] [stdout] | [INFO] [stdout] 3 | fn add_to_vec(mut vec: Vec) { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `user` [INFO] [stdout] --> src/exercices/day3/_14_error_handling/option3.rs:21:28 [INFO] [stdout] | [INFO] [stdout] 21 | fn add_user(&mut self, user: User) { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_user` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `username` [INFO] [stdout] --> src/exercices/day3/_14_error_handling/option3.rs:32:38 [INFO] [stdout] | [INFO] [stdout] 32 | fn find_email_by_username(&self, username: &str) -> Option<&String> { [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_username` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `id` [INFO] [stdout] --> src/exercices/day3/_14_error_handling/option3.rs:40:26 [INFO] [stdout] | [INFO] [stdout] 40 | fn is_premium(&self, id: u32) -> Option { [INFO] [stdout] | ^^ help: if this is intentional, prefix it with an underscore: `_id` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handler` [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/event_manager.rs:15:46 [INFO] [stdout] | [INFO] [stdout] 15 | pub fn register_start_handler(&mut self, handler: impl FnMut() -> () + 'static) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_handler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handler` [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/event_manager.rs:20:48 [INFO] [stdout] | [INFO] [stdout] 20 | pub fn register_message_handler(&mut self, handler: impl Fn(String) -> String + 'static) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_handler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `handler` [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/event_manager.rs:25:49 [INFO] [stdout] | [INFO] [stdout] 25 | pub fn register_shutdown_handler(&mut self, handler: impl FnOnce() -> bool + 'static) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_handler` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/fnmut.rs:1:49 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn apply_operations(data: &mut Vec, mut operations: Vec) [INFO] [stdout] | ----^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `data` [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/fnmut.rs:1:28 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn apply_operations(data: &mut Vec, mut operations: Vec) [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_data` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `operations` [INFO] [stdout] --> src/exercices/day4/_16_fn_pointers/fnmut.rs:1:49 [INFO] [stdout] | [INFO] [stdout] 1 | pub fn apply_operations(data: &mut Vec, mut operations: Vec) [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_operations` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/binary_tree.rs:16:16 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn is_even(value: i32) -> bool { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/binary_tree.rs:22:16 [INFO] [stdout] | [INFO] [stdout] 22 | pub fn new(value: T) -> Self { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `visit` [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/binary_tree.rs:27:38 [INFO] [stdout] | [INFO] [stdout] 27 | pub fn traverse_left_side(&self, visit: &mut dyn FnMut(&T)) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_visit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `visit` [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/binary_tree.rs:33:39 [INFO] [stdout] | [INFO] [stdout] 33 | pub fn traverse_right_side(&self, visit: &mut dyn FnMut(&T)) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_visit` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `value` [INFO] [stdout] --> src/exercices/day4/_17_box_pointers/binary_tree.rs:41:30 [INFO] [stdout] | [INFO] [stdout] 41 | pub fn insert(&mut self, value: i32) { [INFO] [stdout] | ^^^^^ help: if this is intentional, prefix it with an underscore: `_value` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/exercices/day5/_20_refcell_pointer/refcell.rs:16:23 [INFO] [stdout] | [INFO] [stdout] 16 | pub fn log(&self, message: &str) { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0061, E0106, E0308, E0425, E0433, E0596. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0061`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exo-rust` (bin "exercises") due to 76 previous errors; 22 warnings emitted [INFO] running `Command { std: "docker" "inspect" "16f40ce8d8c526342ac12550159557204999345d69fdf99dfafe5fb1fb9862d6", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "16f40ce8d8c526342ac12550159557204999345d69fdf99dfafe5fb1fb9862d6", kill_on_drop: false }` [INFO] [stdout] 16f40ce8d8c526342ac12550159557204999345d69fdf99dfafe5fb1fb9862d6