[INFO] cloning repository https://github.com/joaoprocopio/rustlings [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/joaoprocopio/rustlings" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjoaoprocopio%2Frustlings", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjoaoprocopio%2Frustlings'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] fda4bc9283087e7c0e2116271bbc53889d320ee9 [INFO] checking joaoprocopio/rustlings against master#90384941aae4ea38de00e4702b50757e9b882a19 for pr-138340 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjoaoprocopio%2Frustlings" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/joaoprocopio/rustlings on toolchain 90384941aae4ea38de00e4702b50757e9b882a19 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+90384941aae4ea38de00e4702b50757e9b882a19" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/joaoprocopio/rustlings [INFO] finished tweaking git repo https://github.com/joaoprocopio/rustlings [INFO] tweaked toml for git repo https://github.com/joaoprocopio/rustlings written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+90384941aae4ea38de00e4702b50757e9b882a19" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+90384941aae4ea38de00e4702b50757e9b882a19" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:1680c8fbd8dfb46fcd6d22e546df16ab0e007457dc29fcd9e987cdd5077fd1af" "/opt/rustwide/cargo-home/bin/cargo" "+90384941aae4ea38de00e4702b50757e9b882a19" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b385cdbee7292bf41d405e743b1a3230cbe366da9ed8155806c5bfbe101d717f [INFO] running `Command { std: "docker" "start" "-a" "b385cdbee7292bf41d405e743b1a3230cbe366da9ed8155806c5bfbe101d717f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b385cdbee7292bf41d405e743b1a3230cbe366da9ed8155806c5bfbe101d717f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b385cdbee7292bf41d405e743b1a3230cbe366da9ed8155806c5bfbe101d717f", kill_on_drop: false }` [INFO] [stdout] b385cdbee7292bf41d405e743b1a3230cbe366da9ed8155806c5bfbe101d717f [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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:1680c8fbd8dfb46fcd6d22e546df16ab0e007457dc29fcd9e987cdd5077fd1af" "/opt/rustwide/cargo-home/bin/cargo" "+90384941aae4ea38de00e4702b50757e9b882a19" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 424c92c28fd2bcf59b66690ce16d32764edbaf31b61953b2058614516e465222 [INFO] running `Command { std: "docker" "start" "-a" "424c92c28fd2bcf59b66690ce16d32764edbaf31b61953b2058614516e465222", kill_on_drop: false }` [INFO] [stderr] Checking exercises v0.0.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `super::Command` [INFO] [stdout] --> exercises/quizzes/quiz2.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | use super::Command; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | placeholder("blue"); [INFO] [stdout] | ^^^^^^^^^^^ ------ unexpected argument of type `&'static str` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 16 - placeholder("blue"); [INFO] [stdout] 16 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | placeholder("red".to_string()); [INFO] [stdout] | ^^^^^^^^^^^ ----------------- unexpected argument of type `String` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 18 - placeholder("red".to_string()); [INFO] [stdout] 18 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | placeholder(String::from("hi")); [INFO] [stdout] | ^^^^^^^^^^^ ------------------ unexpected argument of type `String` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 20 - placeholder(String::from("hi")); [INFO] [stdout] 20 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | placeholder("rust is fun!".to_owned()); [INFO] [stdout] | ^^^^^^^^^^^ ------------------------- unexpected argument of type `String` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 22 - placeholder("rust is fun!".to_owned()); [INFO] [stdout] 22 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | placeholder("nice weather".into()); [INFO] [stdout] | ^^^^^^^^^^^ --------------------- unexpected argument [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 24 - placeholder("nice weather".into()); [INFO] [stdout] 24 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | placeholder(format!("Interpolation {}", "Station")); [INFO] [stdout] | ^^^^^^^^^^^ -------------------------------------- unexpected argument of type `String` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 26 - placeholder(format!("Interpolation {}", "Station")); [INFO] [stdout] 26 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: macro requires a boolean expression as an argument [INFO] [stdout] --> exercises/17_tests/tests1.rs:20:9 [INFO] [stdout] | [INFO] [stdout] 20 | assert!(); [INFO] [stdout] | ^^^^^^^^^ boolean expression required [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: macro requires a boolean expression as an argument [INFO] [stdout] --> exercises/17_tests/tests1.rs:21:9 [INFO] [stdout] | [INFO] [stdout] 21 | assert!(); [INFO] [stdout] | ^^^^^^^^^ boolean expression required [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0532]: expected a pattern, found a function call [INFO] [stdout] --> exercises/19_smart_pointers/cow1.rs:42:33 [INFO] [stdout] | [INFO] [stdout] 42 | assert!(matches!(input, todo!())); [INFO] [stdout] | ^^^^^^^ not a tuple struct or tuple variant [INFO] [stdout] | [INFO] [stdout] = note: function calls are not allowed in patterns: [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[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | placeholder(&String::from("abc")[0..1]); [INFO] [stdout] | ^^^^^^^^^^^ -------------------------- unexpected argument of type `&str` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 30 - placeholder(&String::from("abc")[0..1]); [INFO] [stdout] 30 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:32:5 [INFO] [stdout] | [INFO] [stdout] 32 | placeholder(" hello there ".trim()); [INFO] [stdout] | ^^^^^^^^^^^ ----------------------- unexpected argument of type `&str` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 32 - placeholder(" hello there ".trim()); [INFO] [stdout] 32 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | placeholder("Happy Monday!".replace("Mon", "Tues")); [INFO] [stdout] | ^^^^^^^^^^^ -------------------------------------- unexpected argument of type `String` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 34 - placeholder("Happy Monday!".replace("Mon", "Tues")); [INFO] [stdout] 34 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0061]: this function takes 0 arguments but 1 argument was supplied [INFO] [stdout] --> exercises/09_strings/strings4.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | placeholder("mY sHiFt KeY iS sTiCkY".to_lowercase()); [INFO] [stdout] | ^^^^^^^^^^^ --------------------------------------- unexpected argument of type `String` [INFO] [stdout] | [INFO] [stdout] note: function defined here [INFO] [stdout] --> exercises/09_strings/strings4.rs:2:4 [INFO] [stdout] | [INFO] [stdout] 2 | fn placeholder() {} [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] help: remove the extra argument [INFO] [stdout] | [INFO] [stdout] 36 - placeholder("mY sHiFt KeY iS sTiCkY".to_lowercase()); [INFO] [stdout] 36 + placeholder(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0061`. [INFO] [stdout] [INFO] [stdout] error[E0532]: expected a pattern, found a function call [INFO] [stdout] --> exercises/19_smart_pointers/cow1.rs:55:33 [INFO] [stdout] | [INFO] [stdout] 55 | assert!(matches!(input, todo!())); [INFO] [stdout] | ^^^^^^^ not a tuple struct or tuple variant [INFO] [stdout] | [INFO] [stdout] = note: function calls are not allowed in patterns: [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[E0532]: expected a pattern, found a function call [INFO] [stdout] --> exercises/19_smart_pointers/cow1.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | assert!(matches!(input, todo!())); [INFO] [stdout] | ^^^^^^^ not a tuple struct or tuple variant [INFO] [stdout] | [INFO] [stdout] = note: function calls are not allowed in patterns: [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[E0603]: function `make_sausage` is private [INFO] [stdout] --> exercises/10_modules/modules1.rs:15:22 [INFO] [stdout] | [INFO] [stdout] 15 | sausage_factory::make_sausage(); [INFO] [stdout] | ^^^^^^^^^^^^ private function [INFO] [stdout] | [INFO] [stdout] note: the function `make_sausage` is defined here [INFO] [stdout] --> exercises/10_modules/modules1.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | fn make_sausage() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `append_bar` found for struct `Vec` in the current scope [INFO] [stdout] --> exercises/15_traits/traits2.rs:18:49 [INFO] [stdout] | [INFO] [stdout] 18 | let mut foo = vec![String::from("Foo")].append_bar(); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is implemented and in scope [INFO] [stdout] note: `AppendBar` defines an item `append_bar`, perhaps you need to implement it [INFO] [stdout] --> exercises/15_traits/traits2.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | trait AppendBar { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] help: there is a method `append` with a similar name, but with different arguments [INFO] [stdout] --> /rustc/90384941aae4ea38de00e4702b50757e9b882a19/library/alloc/src/vec/mod.rs:2566:5 [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "strings4") due to 10 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] For more information about this error, try `rustc --explain E0599`. [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0603`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "tests1" test) due to 2 previous errors [INFO] [stderr] error: could not compile `exercises` (bin "modules1" test) due to 1 previous error [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/23_conversions/from_str.rs:44:29 [INFO] [stdout] | [INFO] [stdout] 44 | fn from_str(s: &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] For more information about this error, try `rustc --explain E0532`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "traits2" test) due to 1 previous error [INFO] [stderr] error: could not compile `exercises` (bin "cow1" test) due to 3 previous errors [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "from_str" test) due to 1 previous error [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> exercises/06_move_semantics/move_semantics5.rs:13:12 [INFO] [stdout] | [INFO] [stdout] 12 | fn string_uppercase(mut data: &String) { [INFO] [stdout] | ------- expected due to this parameter type [INFO] [stdout] 13 | data = data.to_uppercase(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ expected `&String`, found `String` [INFO] [stdout] | [INFO] [stdout] help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding [INFO] [stdout] | [INFO] [stdout] 12 ~ fn string_uppercase(data: &mut String) { [INFO] [stdout] 13 ~ *data = data.to_uppercase(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0597]: `string2` does not live long enough [INFO] [stdout] --> exercises/16_lifetimes/lifetimes2.rs:17:36 [INFO] [stdout] | [INFO] [stdout] 16 | let string2 = String::from("xyz"); [INFO] [stdout] | ------- binding `string2` declared here [INFO] [stdout] 17 | result = longest(&string1, &string2); [INFO] [stdout] | ^^^^^^^^ borrowed value does not live long enough [INFO] [stdout] 18 | } [INFO] [stdout] | - `string2` dropped here while still borrowed [INFO] [stdout] 19 | println!("The longest string is '{result}'"); [INFO] [stdout] | -------- borrow later used here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0597`. [INFO] [stdout] [INFO] [stdout] error[E0369]: cannot multiply `Result` by `{integer}` [INFO] [stdout] --> exercises/13_error_handling/errors2.rs:26:12 [INFO] [stdout] | [INFO] [stdout] 26 | Ok(qty * cost_per_item + processing_fee) [INFO] [stdout] | --- ^ ------------- {integer} [INFO] [stdout] | | [INFO] [stdout] | Result [INFO] [stdout] | [INFO] [stdout] note: the foreign item type `Result` doesn't implement `Mul<{integer}>` [INFO] [stdout] --> /rustc/90384941aae4ea38de00e4702b50757e9b882a19/library/core/src/result.rs:528:1 [INFO] [stdout] | [INFO] [stdout] = note: not implement `Mul<{integer}>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0382]: borrow of moved value: `data` [INFO] [stdout] --> exercises/06_move_semantics/move_semantics5.rs:23:22 [INFO] [stdout] | [INFO] [stdout] 19 | let data = "Rust is great!".to_string(); [INFO] [stdout] | ---- move occurs because `data` has type `String`, which does not implement the `Copy` trait [INFO] [stdout] 20 | [INFO] [stdout] 21 | get_char(data); [INFO] [stdout] | ---- value moved here [INFO] [stdout] 22 | [INFO] [stdout] 23 | string_uppercase(&data); [INFO] [stdout] | ^^^^^ value borrowed here after move [INFO] [stdout] | [INFO] [stdout] note: consider changing this parameter type in function `get_char` to borrow instead if owning the value isn't necessary [INFO] [stdout] --> exercises/06_move_semantics/move_semantics5.rs:7:19 [INFO] [stdout] | [INFO] [stdout] 7 | fn get_char(data: String) -> char { [INFO] [stdout] | -------- ^^^^^^ this parameter takes ownership of the value [INFO] [stdout] | | [INFO] [stdout] | in this function [INFO] [stdout] help: consider cloning the value if the performance cost is acceptable [INFO] [stdout] | [INFO] [stdout] 21 | get_char(data.clone()); [INFO] [stdout] | ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "lifetimes2") due to 1 previous error [INFO] [stdout] Some errors have detailed explanations: E0308, E0382. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0369`. [INFO] [stdout] [INFO] [stderr] error: could not compile `exercises` (bin "move_semantics5") due to 2 previous errors [INFO] [stderr] error: could not compile `exercises` (bin "errors2" test) due to 1 previous error [INFO] [stdout] error[E0382]: use of moved value: `tx` [INFO] [stdout] --> exercises/20_threads/threads3.rs:28:19 [INFO] [stdout] | [INFO] [stdout] 17 | fn send_tx(q: Queue, tx: mpsc::Sender) { [INFO] [stdout] | -- move occurs because `tx` has type `std::sync::mpsc::Sender`, which does not implement the `Copy` trait [INFO] [stdout] ... [INFO] [stdout] 20 | thread::spawn(move || { [INFO] [stdout] | ------- value moved into closure here [INFO] [stdout] 21 | for val in q.first_half { [INFO] [stdout] | ----------------------- inside of this loop [INFO] [stdout] 22 | println!("Sending {val:?}"); [INFO] [stdout] 23 | tx.send(val).unwrap(); [INFO] [stdout] | -- variable moved due to use in closure [INFO] [stdout] ... [INFO] [stdout] 28 | thread::spawn(move || { [INFO] [stdout] | ^^^^^^^ value used here after move [INFO] [stdout] ... [INFO] [stdout] 31 | tx.send(val).unwrap(); [INFO] [stdout] | -- use occurs due to use in closure [INFO] [stdout] | [INFO] [stdout] help: consider moving the expression out of the loop so it is only moved once [INFO] [stdout] | [INFO] [stdout] 21 ~ let mut value = tx.send(val); [INFO] [stdout] 22 ~ for val in q.first_half { [INFO] [stdout] 23 | println!("Sending {val:?}"); [INFO] [stdout] 24 ~ value.unwrap(); [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 `exercises` (bin "threads3" test) due to 1 previous error [INFO] running `Command { std: "docker" "inspect" "424c92c28fd2bcf59b66690ce16d32764edbaf31b61953b2058614516e465222", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "424c92c28fd2bcf59b66690ce16d32764edbaf31b61953b2058614516e465222", kill_on_drop: false }` [INFO] [stdout] 424c92c28fd2bcf59b66690ce16d32764edbaf31b61953b2058614516e465222