[INFO] fetching crate hgrep 0.3.7... [INFO] checking hgrep-0.3.7 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] extracting crate hgrep 0.3.7 into /workspace/builds/worker-6-tc2/source [INFO] validating manifest of crates.io crate hgrep 0.3.7 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 hgrep 0.3.7 [INFO] finished tweaking crates.io crate hgrep 0.3.7 [INFO] tweaked toml for crates.io crate hgrep 0.3.7 written to /workspace/builds/worker-6-tc2/source/Cargo.toml [INFO] crate crates.io crate hgrep 0.3.7 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-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 83c6ad4a4aaba2d4c2682443ce4ad302dbf8ee126c15d8e4c4b4f5fb7bec2b1b [INFO] running `Command { std: "docker" "start" "-a" "83c6ad4a4aaba2d4c2682443ce4ad302dbf8ee126c15d8e4c4b4f5fb7bec2b1b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "83c6ad4a4aaba2d4c2682443ce4ad302dbf8ee126c15d8e4c4b4f5fb7bec2b1b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "83c6ad4a4aaba2d4c2682443ce4ad302dbf8ee126c15d8e4c4b4f5fb7bec2b1b", kill_on_drop: false }` [INFO] [stdout] 83c6ad4a4aaba2d4c2682443ce4ad302dbf8ee126c15d8e4c4b4f5fb7bec2b1b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-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] 9ce54836d21116356dedbc037cb89cc01b366d0583f254fb95a2b3bd92b82fed [INFO] running `Command { std: "docker" "start" "-a" "9ce54836d21116356dedbc037cb89cc01b366d0583f254fb95a2b3bd92b82fed", 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] Checking memchr v2.7.2 [INFO] [stderr] Compiling proc-macro2 v1.0.81 [INFO] [stderr] Compiling serde v1.0.198 [INFO] [stderr] Checking regex-syntax v0.8.3 [INFO] [stderr] Compiling rustix v0.38.33 [INFO] [stderr] Checking linux-raw-sys v0.4.13 [INFO] [stderr] Checking bitflags v2.5.0 [INFO] [stderr] Compiling crossbeam-utils v0.8.19 [INFO] [stderr] Compiling rand_core v0.6.4 [INFO] [stderr] Compiling libc v0.2.153 [INFO] [stderr] Compiling siphasher v0.3.11 [INFO] [stderr] Compiling crc32fast v1.4.0 [INFO] [stderr] Checking anstream v0.6.13 [INFO] [stderr] Checking clap_lex v0.7.0 [INFO] [stderr] Checking deranged v0.3.11 [INFO] [stderr] Checking indexmap v2.2.6 [INFO] [stderr] Compiling rand v0.8.5 [INFO] [stderr] Compiling thiserror v1.0.59 [INFO] [stderr] Compiling serde_json v1.0.116 [INFO] [stderr] Compiling phf_shared v0.11.2 [INFO] [stderr] Checking ryu v1.0.17 [INFO] [stderr] Checking encoding_rs v0.8.34 [INFO] [stderr] Checking unicode-width v0.1.11 [INFO] [stderr] Compiling semver v1.0.22 [INFO] [stderr] Checking bytemuck v1.15.0 [INFO] [stderr] Checking line-wrap v0.2.0 [INFO] [stderr] Checking console v0.15.8 [INFO] [stderr] Checking flate2 v1.0.28 [INFO] [stderr] Checking dirs-sys v0.3.7 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Checking quick-xml v0.31.0 [INFO] [stderr] Checking grep-matcher v0.1.7 [INFO] [stderr] Checking rgb v0.8.37 [INFO] [stderr] Checking crossbeam-epoch v0.9.18 [INFO] [stderr] Compiling jobserver v0.1.30 [INFO] [stderr] Checking option-ext v0.2.0 [INFO] [stderr] Compiling bat v0.24.0 [INFO] [stderr] Compiling phf_generator v0.11.2 [INFO] [stderr] Checking unsafe-libyaml v0.2.11 [INFO] [stderr] Compiling anyhow v1.0.82 [INFO] [stderr] Checking std_prelude v0.2.12 [INFO] [stderr] Checking crossbeam-deque v0.8.5 [INFO] [stderr] Checking path_abs v0.5.1 [INFO] [stderr] Checking phf v0.11.2 [INFO] [stderr] Checking time v0.3.36 [INFO] [stderr] Checking ansi_colours v1.2.2 [INFO] [stderr] Compiling cc v1.0.95 [INFO] [stderr] Compiling phf_codegen v0.11.2 [INFO] [stderr] Compiling quote v1.0.36 [INFO] [stderr] Compiling terminfo v0.8.0 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking rayon-core v1.12.1 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking dirs v4.0.0 [INFO] [stderr] Checking content_inspector v0.2.4 [INFO] [stderr] Checking memmap2 v0.9.4 [INFO] [stderr] Compiling syn v2.0.60 [INFO] [stderr] Checking roff v0.2.1 [INFO] [stderr] Checking terminal_size v0.3.0 [INFO] [stderr] Checking bytesize v1.3.0 [INFO] [stderr] Checking either v1.11.0 [INFO] [stderr] Checking nu-ansi-term v0.49.0 [INFO] [stderr] Checking clap_builder v4.5.2 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking shlex v1.3.0 [INFO] [stderr] Checking yansi v0.5.1 [INFO] [stderr] Checking similar v2.5.0 [INFO] [stderr] Checking rayon v1.10.0 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking encoding_rs_io v0.1.7 [INFO] [stderr] Checking pretty_assertions v1.4.0 [INFO] [stderr] Checking insta v1.38.0 [INFO] [stderr] Compiling onig_sys v69.8.1 [INFO] [stderr] Compiling pcre2-sys v0.2.9 [INFO] [stderr] Compiling libmimalloc-sys v0.1.35 [INFO] [stderr] Checking regex-automata v0.4.6 [INFO] [stderr] Checking pcre2 v0.2.7 [INFO] [stderr] Checking grep-pcre2 v0.1.7 [INFO] [stderr] Checking mimalloc v0.1.39 [INFO] [stderr] Checking clap v4.5.4 [INFO] [stderr] Checking clap_complete v4.5.2 [INFO] [stderr] Checking clap_mangen v0.2.20 [INFO] [stderr] Compiling serde_derive v1.0.198 [INFO] [stderr] Compiling thiserror-impl v1.0.59 [INFO] [stderr] Checking onig v6.4.0 [INFO] [stderr] Checking clap_complete_nushell v4.5.1 [INFO] [stderr] Checking bstr v1.9.1 [INFO] [stderr] Checking regex v1.10.4 [INFO] [stderr] Checking globset v0.4.14 [INFO] [stderr] Checking grep-regex v0.1.12 [INFO] [stderr] Checking grep-searcher v0.1.13 [INFO] [stderr] Checking ignore v0.4.22 [INFO] [stderr] Checking bincode v1.3.3 [INFO] [stderr] Checking plist v1.6.1 [INFO] [stderr] Checking clircle v0.4.0 [INFO] [stderr] Checking serde_yaml v0.9.34+deprecated [INFO] [stderr] Checking syntect v5.2.0 [INFO] [stderr] Checking hgrep v0.3.7 (/tmp/fixit) [INFO] [stderr] Migrating src/lib.rs from 2021 edition to 2024 [INFO] [stderr] warning: failed to automatically apply fixes suggested by rustc to crate `hgrep` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/chunk.rs [INFO] [stderr] * src/ripgrep.rs [INFO] [stderr] * src/syntect.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/chunk.rs:387:24 [INFO] [stderr] | [INFO] [stderr] 387 | {$($name:ident($tests:expr_2021);)+} => { [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/chunk.rs:387:31 [INFO] [stdout] | [INFO] [stdout] 387 | {$($name:ident($tests: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] 387 | {$($name:ident($tests:expr_2021);)+} => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [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/ripgrep.rs:905:17 [INFO] [stderr] | [INFO] [stderr] 905 | $ranges: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/ripgrep.rs:906:17 [INFO] [stderr] | [INFO] [stderr] 906 | $line_lens: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/ripgrep.rs:907:20 [INFO] [stderr] | [INFO] [stderr] 907 | [$($expected: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/syntect.rs:1267:29 [INFO] [stderr] | [INFO] [stderr] 1267 | ($($input:ident($f: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/syntect.rs:1447:29 [INFO] [stderr] | [INFO] [stderr] 1447 | ($($input:ident($f: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: 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] --> src/ripgrep.rs:905:25 [INFO] [stdout] | [INFO] [stdout] 905 | $ranges: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] 905 | $ranges: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/ripgrep.rs:906:28 [INFO] [stdout] | [INFO] [stdout] 906 | $line_lens: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] 906 | $line_lens: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/ripgrep.rs:907:30 [INFO] [stdout] | [INFO] [stdout] 907 | [$($expected: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] 907 | [$($expected: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/syntect.rs:1267:32 [INFO] [stdout] | [INFO] [stdout] 1267 | ($($input:ident($f: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] 1267 | ($($input:ident($f: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/syntect.rs:1447:32 [INFO] [stdout] | [INFO] [stdout] 1447 | ($($input:ident($f: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] 1447 | ($($input:ident($f: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/test.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | env::set_var(name, v); [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] 92 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 93 ~ unsafe { env::set_var(name, v) }; [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] --> src/test.rs:94:13 [INFO] [stdout] | [INFO] [stdout] 94 | env::remove_var(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] 94 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 95 ~ unsafe { env::remove_var(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/test.rs:105:17 [INFO] [stdout] | [INFO] [stdout] 105 | env::set_var(name, value); [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] 105 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 106 ~ unsafe { env::set_var(name, value) }; [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] --> src/test.rs:107:17 [INFO] [stdout] | [INFO] [stdout] 107 | env::remove_var(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] 107 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 108 ~ unsafe { env::remove_var(name) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/ripgrep.rs:409:22 [INFO] [stdout] | [INFO] [stdout] 409 | let entries = if let Some(paths) = paths { [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/ripgrep.rs:411:5 [INFO] [stdout] | [INFO] [stdout] 411 | } else { [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] 409 ~ let entries = match paths { Some(paths) => { [INFO] [stdout] 410 | config.build_walker(paths)? [INFO] [stdout] 411 ~ } _ => { [INFO] [stdout] 412 | let cwd = env::current_dir()?; [INFO] [stdout] 413 | let paths = std::iter::once(cwd.as_path()); [INFO] [stdout] 414 | config.build_walker(paths)? [INFO] [stdout] 415 ~ }}; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 11 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Fixed src/ripgrep.rs (1 fix) [INFO] [stderr] Migrating src/main.rs from 2021 edition to 2024 [INFO] [stderr] warning: failed to automatically apply fixes suggested by rustc to crate `hgrep` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [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/main.rs:828:27 [INFO] [stderr] | [INFO] [stderr] 828 | ($name:ident, $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] --> src/main.rs:937:27 [INFO] [stderr] | [INFO] [stderr] 937 | ($name:ident, $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] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/main.rs:828:33 [INFO] [stdout] | [INFO] [stdout] 828 | ($name:ident, $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] = 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] 828 | ($name:ident, $args:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stderr] error[E0658]: fragment specifier `expr_2021` is unstable [INFO] [stderr] --> src/main.rs:998:27 [INFO] [stderr] | [INFO] [stderr] 998 | ($name:ident, $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] --> src/main.rs:1088:27 [INFO] [stderr] | [INFO] [stderr] 1088 | ($name:ident, $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: aborting due to 4 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/main.rs:937:33 [INFO] [stdout] | [INFO] [stdout] 937 | ($name:ident, $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] 937 | ($name:ident, $args: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/main.rs:998:33 [INFO] [stdout] | [INFO] [stdout] 998 | ($name:ident, $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] 998 | ($name:ident, $args: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/main.rs:1088:33 [INFO] [stdout] | [INFO] [stdout] 1088 | ($name:ident, $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] 1088 | ($name:ident, $args: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:1143:21 [INFO] [stdout] | [INFO] [stdout] 1143 | env::set_var(OPTS_ENV_VAR, v); [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] 1143 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 1144 ~ unsafe { env::set_var(OPTS_ENV_VAR, v) }; [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] --> src/main.rs:1145:21 [INFO] [stdout] | [INFO] [stdout] 1145 | env::remove_var(OPTS_ENV_VAR); [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] 1145 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 1146 ~ unsafe { env::remove_var(OPTS_ENV_VAR) }; [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:1165:17 [INFO] [stdout] | [INFO] [stdout] 1165 | env::set_var(OPTS_ENV_VAR, env); [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] 1165 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 1166 ~ unsafe { env::set_var(OPTS_ENV_VAR, env) }; [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] --> src/main.rs:1181:13 [INFO] [stdout] | [INFO] [stdout] 1181 | env::remove_var(OPTS_ENV_VAR); [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] 1181 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 1182 ~ unsafe { env::remove_var(OPTS_ENV_VAR) }; [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:1193:13 [INFO] [stdout] | [INFO] [stdout] 1193 | env::set_var(OPTS_ENV_VAR, "'-i"); [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] 1193 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 1194 ~ unsafe { env::set_var(OPTS_ENV_VAR, "'-i") }; [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:1211:13 [INFO] [stdout] | [INFO] [stdout] 1211 | env::set_var(OPTS_ENV_VAR, OsStr::from_bytes(b"\xc3\x28")); [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] 1211 + // TODO: Audit that the environment access only happens in single-threaded code. [INFO] [stdout] 1212 ~ unsafe { env::set_var(OPTS_ENV_VAR, OsStr::from_bytes(b"\xc3\x28")) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 10 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.59s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking hgrep v0.3.7 (/tmp/fixit) [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/test.rs:92:13 [INFO] [stdout] | [INFO] [stdout] 92 | env::set_var(name, v); [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] --> src/test.rs:94:13 [INFO] [stdout] | [INFO] [stdout] 94 | env::remove_var(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/test.rs:105:17 [INFO] [stdout] | [INFO] [stdout] 105 | env::set_var(name, value); [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] --> src/test.rs:107:17 [INFO] [stdout] | [INFO] [stdout] 107 | env::remove_var(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: 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 `hgrep` (lib test) due to 5 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error[E0133]: call to unsafe function `set_var` is unsafe and requires unsafe block [INFO] [stdout] --> src/main.rs:1143:21 [INFO] [stdout] | [INFO] [stdout] 1143 | env::set_var(OPTS_ENV_VAR, v); [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] --> src/main.rs:1145:21 [INFO] [stdout] | [INFO] [stdout] 1145 | env::remove_var(OPTS_ENV_VAR); [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:1165:17 [INFO] [stdout] | [INFO] [stdout] 1165 | env::set_var(OPTS_ENV_VAR, env); [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] --> src/main.rs:1181:13 [INFO] [stdout] | [INFO] [stdout] 1181 | env::remove_var(OPTS_ENV_VAR); [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:1193:13 [INFO] [stdout] | [INFO] [stdout] 1193 | env::set_var(OPTS_ENV_VAR, "'-i"); [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:1211:13 [INFO] [stdout] | [INFO] [stdout] 1211 | env::set_var(OPTS_ENV_VAR, OsStr::from_bytes(b"\xc3\x28")); [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 6 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 `hgrep` (bin "hgrep" test) due to 7 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" "9ce54836d21116356dedbc037cb89cc01b366d0583f254fb95a2b3bd92b82fed", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9ce54836d21116356dedbc037cb89cc01b366d0583f254fb95a2b3bd92b82fed", kill_on_drop: false }` [INFO] [stdout] 9ce54836d21116356dedbc037cb89cc01b366d0583f254fb95a2b3bd92b82fed