[INFO] cloning repository https://github.com/uamrws/rust_study [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/uamrws/rust_study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fuamrws%2Frust_study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fuamrws%2Frust_study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b0fb1b240fb6e750c66e677e4529c4478c164de1 [INFO] checking uamrws/rust_study against try#4907eac94165faff6c5e5e015670b1c584275f7b for pr-154149 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fuamrws%2Frust_study" "/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/uamrws/rust_study [INFO] finished tweaking git repo https://github.com/uamrws/rust_study [INFO] tweaked toml for git repo https://github.com/uamrws/rust_study written to /workspace/builds/worker-4-tc2/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/uamrws/rust_study on toolchain 4907eac94165faff6c5e5e015670b1c584275f7b [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+4907eac94165faff6c5e5e015670b1c584275f7b" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/uamrws/rust_study 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" "+4907eac94165faff6c5e5e015670b1c584275f7b" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded futures-macro v0.3.24 [INFO] [stderr] Downloaded futures-executor v0.3.24 [INFO] [stderr] Downloaded anyhow v1.0.64 [INFO] [stderr] Downloaded once_cell v1.14.0 [INFO] [stderr] Downloaded tokio v1.21.0 [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+4907eac94165faff6c5e5e015670b1c584275f7b" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 54ea560782dfa1de1050a27b996b2ad3d7b56ee972fe789026f5c8f7c4f8b91e [INFO] running `Command { std: "docker" "start" "-a" "54ea560782dfa1de1050a27b996b2ad3d7b56ee972fe789026f5c8f7c4f8b91e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "54ea560782dfa1de1050a27b996b2ad3d7b56ee972fe789026f5c8f7c4f8b91e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "54ea560782dfa1de1050a27b996b2ad3d7b56ee972fe789026f5c8f7c4f8b91e", kill_on_drop: false }` [INFO] [stdout] 54ea560782dfa1de1050a27b996b2ad3d7b56ee972fe789026f5c8f7c4f8b91e [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:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+4907eac94165faff6c5e5e015670b1c584275f7b" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] fe272c970001724d2ec4efd4fd0619af05d9694fed457faefcfe4341147bc31f [INFO] running `Command { std: "docker" "start" "-a" "fe272c970001724d2ec4efd4fd0619af05d9694fed457faefcfe4341147bc31f", kill_on_drop: false }` [INFO] [stderr] warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` [INFO] [stderr] | [INFO] [stderr] = note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest [INFO] [stderr] = note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest [INFO] [stderr] = note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions [INFO] [stderr] Compiling proc-macro2 v1.0.43 [INFO] [stderr] Compiling quote v1.0.21 [INFO] [stderr] Compiling syn v1.0.99 [INFO] [stderr] Compiling unicode-ident v1.0.3 [INFO] [stderr] Compiling futures-core v0.3.24 [INFO] [stderr] Compiling futures-channel v0.3.24 [INFO] [stderr] Compiling futures-task v0.3.24 [INFO] [stderr] Checking futures-sink v0.3.24 [INFO] [stderr] Compiling futures-util v0.3.24 [INFO] [stderr] Checking futures-io v0.3.24 [INFO] [stderr] Checking once_cell v1.14.0 [INFO] [stderr] Compiling slab v0.4.7 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Compiling serde v1.0.144 [INFO] [stderr] Compiling libc v0.2.132 [INFO] [stderr] Compiling serde_json v1.0.85 [INFO] [stderr] Checking ryu v1.0.11 [INFO] [stderr] Checking itoa v1.0.3 [INFO] [stderr] Compiling lock_api v0.4.8 [INFO] [stderr] Checking thread_local v1.1.4 [INFO] [stderr] Checking section_timer_future v0.1.0 (/opt/rustwide/workdir/section18_async/section_timer_future) [INFO] [stderr] Checking section16_raw_pointer v0.1.0 (/opt/rustwide/workdir/section16_raw_pointer) [INFO] [stderr] Compiling anyhow v1.0.64 [INFO] [stderr] Compiling tokio v1.21.0 [INFO] [stderr] Checking bytes v1.2.1 [INFO] [stderr] Checking section14_threads v0.1.0 (/opt/rustwide/workdir/section14_threads) [INFO] [stderr] Checking section13_smart_pointer v0.1.0 (/opt/rustwide/workdir/section13_smart_pointer) [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> section14_threads/src/bin/temp.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | A.push_str("asd"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> section14_threads/src/bin/temp.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | println!("{}", A) [INFO] [stdout] | ^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> section14_threads/src/bin/temp.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | A.push_str("asd"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> section14_threads/src/bin/temp.rs:5:24 [INFO] [stdout] | [INFO] [stdout] 5 | println!("{}", A) [INFO] [stdout] | ^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking section09_type-convert v0.1.0 (/opt/rustwide/workdir/section09_type-convert) [INFO] [stderr] Checking section11_closure v0.1.0 (/opt/rustwide/workdir/section11_closure) [INFO] [stderr] Checking section10_lifetime v0.1.0 (/opt/rustwide/workdir/section10_lifetime) [INFO] [stdout] warning: unused import: `std::result` [INFO] [stdout] --> section10_lifetime/src/bin/main05.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::result; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> section10_lifetime/src/bin/main05.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 13 | fn longest<'a, 'b>(x: &'a str, y: &'b str) -> &'b str { [INFO] [stdout] | -- -- lifetime `'b` defined here [INFO] [stdout] | | [INFO] [stdout] | lifetime `'a` defined here [INFO] [stdout] 14 | x [INFO] [stdout] | ^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a` [INFO] [stdout] | [INFO] [stdout] = help: consider adding the following bound: `'a: 'b` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `y` [INFO] [stdout] --> section10_lifetime/src/bin/main05.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | fn longest<'a, 'b>(x: &'a str, y: &'b str) -> &'b str { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_y` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `section10_lifetime` (bin "main05") due to 1 previous error; 2 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error: lifetime may not live long enough [INFO] [stdout] --> section10_lifetime/src/bin/main07.rs:5:9 [INFO] [stdout] | [INFO] [stdout] 4 | fn temp<'a, 'b>(s: &'b mut &'a str) -> &'b mut &'b str { [INFO] [stdout] | -- -- lifetime `'b` defined here [INFO] [stdout] | | [INFO] [stdout] | lifetime `'a` defined here [INFO] [stdout] 5 | s [INFO] [stdout] | ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b` [INFO] [stdout] | [INFO] [stdout] = help: consider adding the following bound: `'b: 'a` [INFO] [stdout] = note: requirement occurs because of a mutable reference to `&str` [INFO] [stdout] = note: mutable references are invariant over their type parameter [INFO] [stdout] = help: see for more information about variance [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `foo_cloned` [INFO] [stdout] --> section09_type-convert/src/bin/main01.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let foo_cloned = foo.clone(); [INFO] [stdout] | ^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_foo_cloned` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> section09_type-convert/src/bin/main01.rs:3:21 [INFO] [stdout] | [INFO] [stdout] 3 | struct Container(Arc); [INFO] [stdout] | --------- ^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `Container` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0499]: cannot borrow `*map` as mutable more than once at a time [INFO] [stdout] --> section10_lifetime/src/bin/main03.rs:30:9 [INFO] [stdout] | [INFO] [stdout] 22 | fn get_default<'m, K, V>(map: &'m mut HashMap, key: K) -> &'m mut V [INFO] [stdout] | -- lifetime `'m` defined here [INFO] [stdout] ... [INFO] [stdout] 27 | if let Some(v) = map.get_mut(&key) { [INFO] [stdout] | --- first mutable borrow occurs here [INFO] [stdout] 28 | return v; [INFO] [stdout] | - returning this value requires that `*map` is borrowed for `'m` [INFO] [stdout] 29 | } [INFO] [stdout] 30 | map.insert(key.clone(), V::default()); [INFO] [stdout] | ^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `section10_lifetime` (bin "main07" test) due to 1 previous error [INFO] [stdout] error[E0499]: cannot borrow `*map` as mutable more than once at a time [INFO] [stdout] --> section10_lifetime/src/bin/main03.rs:31:9 [INFO] [stdout] | [INFO] [stdout] 22 | fn get_default<'m, K, V>(map: &'m mut HashMap, key: K) -> &'m mut V [INFO] [stdout] | -- lifetime `'m` defined here [INFO] [stdout] ... [INFO] [stdout] 27 | if let Some(v) = map.get_mut(&key) { [INFO] [stdout] | --- first mutable borrow occurs here [INFO] [stdout] 28 | return v; [INFO] [stdout] | - returning this value requires that `*map` is borrowed for `'m` [INFO] [stdout] ... [INFO] [stdout] 31 | map.get_mut(&key).unwrap() [INFO] [stdout] | ^^^ second mutable borrow occurs here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0499`. [INFO] [stdout] [INFO] [stderr] error: could not compile `section10_lifetime` (bin "main03") due to 2 previous errors [INFO] [stdout] warning: call to `.clone()` on a reference in this situation does nothing [INFO] [stdout] --> section09_type-convert/src/bin/main01.rs:7:25 [INFO] [stdout] | [INFO] [stdout] 7 | let bar_cloned = bar.clone(); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: the type `Container` does not implement `Clone`, so calling `clone` on `&Container` copies the reference, which does not do anything and can be removed [INFO] [stdout] = note: `#[warn(noop_method_call)]` on by default [INFO] [stdout] help: remove this redundant call [INFO] [stdout] | [INFO] [stdout] 7 - let bar_cloned = bar.clone(); [INFO] [stdout] 7 + let bar_cloned = bar; [INFO] [stdout] | [INFO] [stdout] help: if you meant to clone `Container`, implement `Clone` for it [INFO] [stdout] | [INFO] [stdout] 3 + #[derive(Clone)] [INFO] [stdout] 4 | struct Container(Arc); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0525]: expected a closure that implements the `FnMut` trait, but this closure only implements `FnOnce` [INFO] [stdout] --> section11_closure/src/bin/main03.rs:4:25 [INFO] [stdout] | [INFO] [stdout] 4 | let update_string = |str| -> String { [INFO] [stdout] | ^^^^^^^^^^^^^^^ this closure implements `FnOnce`, not `FnMut` [INFO] [stdout] 5 | s.push_str(str); [INFO] [stdout] 6 | s [INFO] [stdout] | - closure is `FnOnce` because it moves the variable `s` out of its environment [INFO] [stdout] ... [INFO] [stdout] 9 | exec(update_string); [INFO] [stdout] | ---- ------------- the requirement to implement `FnMut` derives from here [INFO] [stdout] | | [INFO] [stdout] | required by a bound introduced by this call [INFO] [stdout] | [INFO] [stdout] note: required by a bound in `exec` [INFO] [stdout] --> section11_closure/src/bin/main03.rs:12:16 [INFO] [stdout] | [INFO] [stdout] 12 | fn exec<'a, F: FnMut(&'a str) -> String>(mut f: F) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `exec` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0525`. [INFO] [stdout] [INFO] [stderr] error: could not compile `section11_closure` (bin "main03") due to 1 previous error [INFO] running `Command { std: "docker" "inspect" "fe272c970001724d2ec4efd4fd0619af05d9694fed457faefcfe4341147bc31f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fe272c970001724d2ec4efd4fd0619af05d9694fed457faefcfe4341147bc31f", kill_on_drop: false }` [INFO] [stdout] fe272c970001724d2ec4efd4fd0619af05d9694fed457faefcfe4341147bc31f