[INFO] fetching crate rust-script 0.35.0... [INFO] checking rust-script-0.35.0 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] extracting crate rust-script 0.35.0 into /workspace/builds/worker-1-tc2/source [INFO] validating manifest of crates.io crate rust-script 0.35.0 on toolchain ccf408f4326a858c00dd845a64a86b16f360a801 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate rust-script 0.35.0 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate rust-script 0.35.0 [INFO] tweaked toml for crates.io crate rust-script 0.35.0 written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] crate crates.io crate rust-script 0.35.0 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" "+ccf408f4326a858c00dd845a64a86b16f360a801" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 4cf9bd366c52c8df9337cb499133c65d26a6585434cc08f52680c7a6a321eabc [INFO] running `Command { std: "docker" "start" "-a" "4cf9bd366c52c8df9337cb499133c65d26a6585434cc08f52680c7a6a321eabc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4cf9bd366c52c8df9337cb499133c65d26a6585434cc08f52680c7a6a321eabc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4cf9bd366c52c8df9337cb499133c65d26a6585434cc08f52680c7a6a321eabc", kill_on_drop: false }` [INFO] [stdout] 4cf9bd366c52c8df9337cb499133c65d26a6585434cc08f52680c7a6a321eabc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-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:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e782d2be64aaa00c063a74b69a3d6cf29847d4bdd3fd16a07015237fb587e45a [INFO] running `Command { std: "docker" "start" "-a" "e782d2be64aaa00c063a74b69a3d6cf29847d4bdd3fd16a07015237fb587e45a", kill_on_drop: false }` [INFO] [stderr] Copying to /tmp/fixit [INFO] [stderr] Running `cargo fix --edition` [INFO] [stderr] Migrating Cargo.toml from 2021 edition to 2024 [INFO] [stderr] Compiling serde v1.0.209 [INFO] [stderr] Compiling semver v0.1.20 [INFO] [stderr] Checking utf8parse v0.2.2 [INFO] [stderr] Compiling libc v0.2.158 [INFO] [stderr] Checking anstyle-query v1.1.1 [INFO] [stderr] Checking colorchoice v1.0.2 [INFO] [stderr] Checking anstyle v1.0.8 [INFO] [stderr] Checking is_terminal_polyfill v1.70.1 [INFO] [stderr] Compiling rustix v0.38.35 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Checking indexmap v2.5.0 [INFO] [stderr] Checking winnow v0.6.18 [INFO] [stderr] Checking strsim v0.11.1 [INFO] [stderr] Compiling pulldown-cmark v0.12.0 [INFO] [stderr] Checking unicode-width v0.1.13 [INFO] [stderr] Checking clap_lex v0.7.2 [INFO] [stderr] Checking cpufeatures v0.2.13 [INFO] [stderr] Checking humantime v2.1.0 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking anstyle-parse v0.2.5 [INFO] [stderr] Checking unicode-segmentation v0.1.2 [INFO] [stderr] Checking getopts v0.2.21 [INFO] [stderr] Checking pulldown-cmark-escape v0.11.0 [INFO] [stderr] Checking sha1 v0.10.6 [INFO] [stderr] Compiling rustc_version v0.1.7 [INFO] [stderr] Checking anstream v0.6.15 [INFO] [stderr] Checking shell-words v1.1.0 [INFO] [stderr] Checking lazy_static v0.1.16 [INFO] [stderr] Checking itertools v0.4.19 [INFO] [stderr] Compiling strcursor v0.2.5 [INFO] [stderr] Compiling scan-rules v0.2.0 [INFO] [stderr] Checking clap_builder v4.5.15 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking is-terminal v0.4.13 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking regex-automata v0.4.7 [INFO] [stderr] Checking clap v4.5.16 [INFO] [stderr] Checking tempfile v3.12.0 [INFO] [stderr] Checking toml_datetime v0.6.8 [INFO] [stderr] Checking serde_spanned v0.6.7 [INFO] [stderr] Checking toml_edit v0.22.20 [INFO] [stderr] Checking regex v1.10.6 [INFO] [stderr] Checking env_filter v0.1.2 [INFO] [stderr] Checking env_logger v0.11.5 [INFO] [stderr] Checking toml v0.8.19 [INFO] [stderr] Checking rust-script v0.35.0 (/tmp/fixit) [INFO] [stderr] Migrating src/main.rs from 2021 edition to 2024 [INFO] [stderr] Migrating tests/integration.rs from 2021 edition to 2024 [INFO] [stderr] warning: failed to automatically apply fixes suggested by rustc to crate `rust_script` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/error.rs [INFO] [stderr] * src/main.rs [INFO] [stderr] * src/manifest.rs [INFO] [stderr] [INFO] [stderr] This likely indicates a bug in either rustc or cargo itself, [INFO] [stderr] and we would appreciate a bug report! You're likely to see [INFO] [stderr] a number of compiler warnings after this message which cargo [INFO] [stderr] attempted to fix but failed. If you could open an issue at [INFO] [stderr] https://github.com/rust-lang/rust/issues [INFO] [stderr] quoting the full output of this command we'd be very appreciative! [INFO] [stderr] Note that you may be able to make some more progress in the near-term [INFO] [stderr] fixing code with the `--broken-code` flag [INFO] [stderr] [INFO] [stderr] The following errors were reported: [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/error.rs:41:46 [INFO] [stderr] | [INFO] [stderr] 41 | ($src_ty:ty => $dst_ty:ty, $src:ident -> $e:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/manifest.rs:139:10 [INFO] [stderr] | [INFO] [stderr] 139 | ($i:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/manifest.rs:165:10 [INFO] [stderr] | [INFO] [stderr] 165 | ($m:expr_2021, $p:expr_2021, $r:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/manifest.rs:165:24 [INFO] [stderr] | [INFO] [stderr] 165 | ($m:expr_2021, $p:expr_2021, $r:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/manifest.rs:165:38 [INFO] [stderr] | [INFO] [stderr] 165 | ($m:expr_2021, $p:expr_2021, $r:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/manifest.rs:824:10 [INFO] [stderr] | [INFO] [stderr] 824 | ($c:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/manifest.rs:1072:10 [INFO] [stderr] | [INFO] [stderr] 1072 | ($s:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:162:5 [INFO] [stderr] | [INFO] [stderr] 162 | / unsafe { std::env::set_var( [INFO] [stderr] 163 | | "RUST_SCRIPT_PATH", [INFO] [stderr] 164 | | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stderr] 165 | | ) }; [INFO] [stderr] | |_______^ [INFO] [stderr] | [INFO] [stderr] note: the lint level is defined here [INFO] [stderr] --> src/main.rs:1:11 [INFO] [stderr] | [INFO] [stderr] 1 | #![forbid(unsafe_code)] [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:167:5 [INFO] [stderr] | [INFO] [stderr] 167 | unsafe { std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:169:5 [INFO] [stderr] | [INFO] [stderr] 169 | unsafe { std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:171:5 [INFO] [stderr] | [INFO] [stderr] 171 | unsafe { std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: aborting due to 11 previous errors [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0658`. [INFO] [stderr] Original diagnostics will follow. [INFO] [stderr] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/error.rs:41:49 [INFO] [stdout] | [INFO] [stdout] 41 | ($src_ty:ty => $dst_ty:ty, $src:ident -> $e:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] = note: `--force-warn edition-2024-expr-fragment-specifier` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 41 | ($src_ty:ty => $dst_ty:ty, $src:ident -> $e:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/manifest.rs:139:13 [INFO] [stdout] | [INFO] [stdout] 139 | ($i:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 139 | ($i:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/manifest.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | ($m:expr, $p:expr, $r:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 165 | ($m:expr_2021, $p:expr, $r:expr) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/manifest.rs:165:22 [INFO] [stdout] | [INFO] [stdout] 165 | ($m:expr, $p:expr, $r:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 165 | ($m:expr, $p:expr_2021, $r:expr) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/manifest.rs:165:31 [INFO] [stdout] | [INFO] [stdout] 165 | ($m:expr, $p:expr, $r:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 165 | ($m:expr, $p:expr, $r:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/manifest.rs:824:13 [INFO] [stdout] | [INFO] [stdout] 824 | ($c:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 824 | ($c:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/manifest.rs:1072:13 [INFO] [stdout] | [INFO] [stdout] 1072 | ($s:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 1072 | ($s:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / std::env::set_var( [INFO] [stdout] 162 | | "RUST_SCRIPT_PATH", [INFO] [stdout] 163 | | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stdout] 164 | | ); [INFO] [stdout] | |_____^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] = note: `--force-warn deprecated-safe-2024` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 161 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 162 ~ unsafe { std::env::set_var( [INFO] [stdout] 163 | "RUST_SCRIPT_PATH", [INFO] [stdout] 164 | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stdout] 165 ~ ) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 165 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 166 ~ unsafe { std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 166 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 167 ~ unsafe { std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 167 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 168 ~ unsafe { std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/main.rs:233:12 [INFO] [stdout] | [INFO] [stdout] 233 | if let Err(err) = fs::remove_dir_all(&cache_dir) { [INFO] [stdout] | ^^^^^^^^^^^^^^^------------------------------ [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/main.rs:235:9 [INFO] [stdout] | [INFO] [stdout] 235 | } [INFO] [stdout] | ^ [INFO] [stdout] = note: `--force-warn if-let-rescope` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 233 ~ match fs::remove_dir_all(&cache_dir) { Err(err) => { [INFO] [stdout] 234 | error!("failed to remove binary cache {:?}: {}", cache_dir, err); [INFO] [stdout] 235 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/main.rs:260:16 [INFO] [stdout] | [INFO] [stdout] 260 | if let Err(err) = fs::remove_dir_all(&path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^------------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/main.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 260 ~ match fs::remove_dir_all(&path) { Err(err) => { [INFO] [stdout] 261 | error!("failed to remove {:?} from cache: {}", path, err); [INFO] [stdout] 262 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/main.rs:570:16 [INFO] [stdout] | [INFO] [stdout] 570 | if let Ok(file) = fs::File::open(&path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^--------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/main.rs:572:13 [INFO] [stdout] | [INFO] [stdout] 572 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 570 ~ match fs::File::open(&path) { Ok(file) => { [INFO] [stdout] 571 | return Some((path, file)); [INFO] [stdout] 572 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/defer.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | if let Some(f) = self.0.take() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/defer.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 40 ~ match self.0.take() { Some(f) => { [INFO] [stdout] 41 | if let Err(err) = f() { [INFO] [stdout] 42 | error!("deferred function failed: {}", err); [INFO] [stdout] 43 | } [INFO] [stdout] 44 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/defer.rs:41:16 [INFO] [stdout] | [INFO] [stdout] 41 | if let Err(err) = f() { [INFO] [stdout] | ^^^^^^^^^^^^^^^--- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/defer.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 41 ~ match f() { Err(err) => { [INFO] [stdout] 42 | error!("deferred function failed: {}", err); [INFO] [stdout] 43 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/manifest.rs:738:12 [INFO] [stdout] | [INFO] [stdout] 738 | if let Some(m) = cap.get(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^---^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/manifest.rs:740:9 [INFO] [stdout] | [INFO] [stdout] 740 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 738 ~ match cap.get(1) { Some(m) => { [INFO] [stdout] 739 | return Some((Manifest::DepList(m.as_str()), s)); [INFO] [stdout] 740 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 17 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: failed to automatically apply fixes suggested by rustc to crate `integration` [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> tests/util/mod.rs:5:37 [INFO] [stdout] | [INFO] [stdout] 5 | #[env($($env_k:ident=$env_v:expr),* $(,)*)] [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] = note: `--force-warn edition-2024-expr-fragment-specifier` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 5 | #[env($($env_k:ident=$env_v:expr_2021),* $(,)*)] [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * tests/util/mod.rs [INFO] [stderr] [INFO] [stderr] This likely indicates a bug in either rustc or cargo itself, [INFO] [stderr] and we would appreciate a bug report! You're likely to see [INFO] [stderr] a number of compiler warnings after this message which cargo [INFO] [stderr] attempted to fix but failed. If you could open an issue at [INFO] [stderr] https://github.com/rust-lang/rust/issues [INFO] [stderr] quoting the full output of this command we'd be very appreciative! [INFO] [stderr] Note that you may be able to make some more progress in the near-term [INFO] [stderr] fixing code with the `--broken-code` flag [INFO] [stderr] [INFO] [stderr] The following errors were reported: [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> tests/util/mod.rs:5:30 [INFO] [stderr] | [INFO] [stderr] 5 | #[env($($env_k:ident=$env_v:expr_2021),* $(,)*)] [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> tests/util/mod.rs:6:11 [INFO] [stderr] | [INFO] [stderr] 6 | $($args:expr_2021),* $(,)* [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> tests/util/mod.rs:50:8 [INFO] [stderr] | [INFO] [stderr] 50 | ($($args:expr_2021),* $(,)*) => { [INFO] [stderr] | ^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> tests/util/mod.rs:56:14 [INFO] [stderr] | [INFO] [stderr] 56 | (prelude $p:expr_2021; $e:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> tests/util/mod.rs:56:28 [INFO] [stderr] | [INFO] [stderr] 56 | (prelude $p:expr_2021; $e:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> tests/util/mod.rs:60:6 [INFO] [stderr] | [INFO] [stderr] 60 | ($e:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> tests/util/mod.rs:6:17 [INFO] [stdout] | [INFO] [stdout] 6 | $($args:expr),* $(,)* [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 6 | $($args:expr_2021),* $(,)* [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> tests/util/mod.rs:50:14 [INFO] [stdout] | [INFO] [stdout] 50 | ($($args:expr),* $(,)*) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 50 | ($($args:expr_2021),* $(,)*) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stderr] error: aborting due to 6 previous errors [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0658`. [INFO] [stderr] Original diagnostics will follow. [INFO] [stderr] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> tests/util/mod.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | (prelude $p:expr; $e:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 56 | (prelude $p:expr_2021; $e:expr) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> tests/util/mod.rs:56:26 [INFO] [stdout] | [INFO] [stdout] 56 | (prelude $p:expr; $e:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 56 | (prelude $p:expr; $e:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> tests/util/mod.rs:60:9 [INFO] [stdout] | [INFO] [stdout] 60 | ($e:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 60 | ($e:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to deprecated safe function `std::env::remove_var` is unsafe and requires unsafe block [INFO] [stdout] --> tests/tests/script.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | std::env::remove_var("_RUST_SCRIPT_TEST_MESSAGE"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] = note: `--force-warn deprecated-safe-2024` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 211 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 212 ~ unsafe { std::env::remove_var("_RUST_SCRIPT_TEST_MESSAGE") }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> tests/tests/script.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | std::env::set_var("_RUST_SCRIPT_TEST_MESSAGE", "hello"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 220 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 221 ~ unsafe { std::env::set_var("_RUST_SCRIPT_TEST_MESSAGE", "hello") }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 8 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: failed to automatically apply fixes suggested by rustc to crate `rust_script` [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/error.rs:41:49 [INFO] [stdout] | [INFO] [stdout] 41 | ($src_ty:ty => $dst_ty:ty, $src:ident -> $e:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] = note: `--force-warn edition-2024-expr-fragment-specifier` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 41 | ($src_ty:ty => $dst_ty:ty, $src:ident -> $e:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / std::env::set_var( [INFO] [stdout] 162 | | "RUST_SCRIPT_PATH", [INFO] [stdout] 163 | | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stdout] 164 | | ); [INFO] [stdout] | |_____^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] = note: `--force-warn deprecated-safe-2024` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 161 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 162 ~ unsafe { std::env::set_var( [INFO] [stdout] 163 | "RUST_SCRIPT_PATH", [INFO] [stdout] 164 | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stdout] 165 ~ ) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/error.rs [INFO] [stderr] * src/main.rs [INFO] [stderr] [INFO] [stderr] This likely indicates a bug in either rustc or cargo itself, [INFO] [stderr] and we would appreciate a bug report! You're likely to see [INFO] [stderr] a number of compiler warnings after this message which cargo [INFO] [stderr] attempted to fix but failed. If you could open an issue at [INFO] [stderr] https://github.com/rust-lang/rust/issues [INFO] [stderr] quoting the full output of this command we'd be very appreciative! [INFO] [stderr] Note that you may be able to make some more progress in the near-term [INFO] [stderr] fixing code with the `--broken-code` flag [INFO] [stderr] [INFO] [stderr] The following errors were reported: [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/error.rs:41:46 [INFO] [stderr] | [INFO] [stderr] 41 | ($src_ty:ty => $dst_ty:ty, $src:ident -> $e:expr_2021) => { [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: see issue #123742 for more information [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stderr] = note: this compiler was built on 2024-09-17; consider upgrading it if it is out of date [INFO] [stderr] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 165 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 166 ~ unsafe { std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:162:5 [INFO] [stderr] | [INFO] [stderr] 162 | / unsafe { std::env::set_var( [INFO] [stderr] 163 | | "RUST_SCRIPT_PATH", [INFO] [stderr] 164 | | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stderr] 165 | | ) }; [INFO] [stderr] | |_______^ [INFO] [stderr] | [INFO] [stderr] note: the lint level is defined here [INFO] [stderr] --> src/main.rs:1:11 [INFO] [stderr] | [INFO] [stderr] 1 | #![forbid(unsafe_code)] [INFO] [stderr] | ^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:167:5 [INFO] [stderr] | [INFO] [stderr] 167 | unsafe { std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:169:5 [INFO] [stderr] | [INFO] [stderr] 169 | unsafe { std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: usage of an `unsafe` block [INFO] [stderr] --> src/main.rs:171:5 [INFO] [stderr] | [INFO] [stderr] 171 | unsafe { std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()) }; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] error: aborting due to 5 previous errors [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0658`. [INFO] [stderr] Original diagnostics will follow. [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 166 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 167 ~ unsafe { std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] warning: call to deprecated safe function `std::env::set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024! [INFO] [stdout] = note: for more information, see issue #27970 [INFO] [stdout] help: you can wrap the call in an `unsafe` block if you can guarantee that the environment access only happens in single-threaded code [INFO] [stdout] | [INFO] [stdout] 167 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 168 ~ unsafe { std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/main.rs:233:12 [INFO] [stdout] | [INFO] [stdout] 233 | if let Err(err) = fs::remove_dir_all(&cache_dir) { [INFO] [stdout] | ^^^^^^^^^^^^^^^------------------------------ [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/main.rs:235:9 [INFO] [stdout] | [INFO] [stdout] 235 | } [INFO] [stdout] | ^ [INFO] [stdout] = note: `--force-warn if-let-rescope` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 233 ~ match fs::remove_dir_all(&cache_dir) { Err(err) => { [INFO] [stdout] 234 | error!("failed to remove binary cache {:?}: {}", cache_dir, err); [INFO] [stdout] 235 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/main.rs:260:16 [INFO] [stdout] | [INFO] [stdout] 260 | if let Err(err) = fs::remove_dir_all(&path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^------------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/main.rs:262:13 [INFO] [stdout] | [INFO] [stdout] 262 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 260 ~ match fs::remove_dir_all(&path) { Err(err) => { [INFO] [stdout] 261 | error!("failed to remove {:?} from cache: {}", path, err); [INFO] [stdout] 262 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/main.rs:570:16 [INFO] [stdout] | [INFO] [stdout] 570 | if let Ok(file) = fs::File::open(&path) { [INFO] [stdout] | ^^^^^^^^^^^^^^^--------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/main.rs:572:13 [INFO] [stdout] | [INFO] [stdout] 572 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 570 ~ match fs::File::open(&path) { Ok(file) => { [INFO] [stdout] 571 | return Some((path, file)); [INFO] [stdout] 572 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/defer.rs:40:12 [INFO] [stdout] | [INFO] [stdout] 40 | if let Some(f) = self.0.take() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/defer.rs:44:9 [INFO] [stdout] | [INFO] [stdout] 44 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 40 ~ match self.0.take() { Some(f) => { [INFO] [stdout] 41 | if let Err(err) = f() { [INFO] [stdout] 42 | error!("deferred function failed: {}", err); [INFO] [stdout] 43 | } [INFO] [stdout] 44 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/defer.rs:41:16 [INFO] [stdout] | [INFO] [stdout] 41 | if let Err(err) = f() { [INFO] [stdout] | ^^^^^^^^^^^^^^^--- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/defer.rs:43:13 [INFO] [stdout] | [INFO] [stdout] 43 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 41 ~ match f() { Err(err) => { [INFO] [stdout] 42 | error!("deferred function failed: {}", err); [INFO] [stdout] 43 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/manifest.rs:738:12 [INFO] [stdout] | [INFO] [stdout] 738 | if let Some(m) = cap.get(1) { [INFO] [stdout] | ^^^^^^^^^^^^^^---^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/manifest.rs:740:9 [INFO] [stdout] | [INFO] [stdout] 740 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 738 ~ match cap.get(1) { Some(m) => { [INFO] [stdout] 739 | return Some((Manifest::DepList(m.as_str()), s)); [INFO] [stdout] 740 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 11 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.24s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking rust-script v0.35.0 (/tmp/fixit) [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / std::env::set_var( [INFO] [stdout] 162 | | "RUST_SCRIPT_PATH", [INFO] [stdout] 163 | | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stdout] 164 | | ); [INFO] [stdout] | |_____^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `remove_var` is unsafe and requires unsafe block [INFO] [stdout] --> tests/tests/script.rs:211:9 [INFO] [stdout] | [INFO] [stdout] 211 | std::env::remove_var("_RUST_SCRIPT_TEST_MESSAGE"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> tests/tests/script.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | std::env::set_var("_RUST_SCRIPT_TEST_MESSAGE", "hello"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 2 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:161:5 [INFO] [stdout] | [INFO] [stdout] 161 | / std::env::set_var( [INFO] [stdout] 162 | | "RUST_SCRIPT_PATH", [INFO] [stdout] 163 | | input.path().unwrap_or_else(|| Path::new("")), [INFO] [stdout] 164 | | ); [INFO] [stdout] | |_____^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:165:5 [INFO] [stdout] | [INFO] [stdout] 165 | std::env::set_var("RUST_SCRIPT_SAFE_NAME", input.safe_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:166:5 [INFO] [stdout] | [INFO] [stdout] 166 | std::env::set_var("RUST_SCRIPT_PKG_NAME", input.package_name()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | std::env::set_var("RUST_SCRIPT_BASE_PATH", input.base_path()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-script` (test "integration") due to 3 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `rust-script` (bin "rust-script") due to 5 previous errors [INFO] [stdout] error: aborting due to 4 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] error: could not compile `rust-script` (bin "rust-script" test) due to 5 previous errors [INFO] [stderr] error: failed to check after updating to 2024 [INFO] [stderr] [INFO] [stderr] Caused by: [INFO] [stderr] process didn't exit successfully: `cargo check --frozen --all --all-targets --message-format=json` (exit status: 101) [INFO] running `Command { std: "docker" "inspect" "e782d2be64aaa00c063a74b69a3d6cf29847d4bdd3fd16a07015237fb587e45a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e782d2be64aaa00c063a74b69a3d6cf29847d4bdd3fd16a07015237fb587e45a", kill_on_drop: false }` [INFO] [stdout] e782d2be64aaa00c063a74b69a3d6cf29847d4bdd3fd16a07015237fb587e45a