[INFO] cloning repository https://github.com/editso/elf-structure-study [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/editso/elf-structure-study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feditso%2Felf-structure-study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feditso%2Felf-structure-study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] c039d3ff6aca76e3ce83266d5302e449ab680228 [INFO] checking editso/elf-structure-study/c039d3ff6aca76e3ce83266d5302e449ab680228 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Feditso%2Felf-structure-study" "/workspace/builds/worker-5-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/editso/elf-structure-study 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] removed /workspace/builds/worker-5-tc2/source/.cargo/config [INFO] started tweaking git repo https://github.com/editso/elf-structure-study [INFO] finished tweaking git repo https://github.com/editso/elf-structure-study [INFO] tweaked toml for git repo https://github.com/editso/elf-structure-study written to /workspace/builds/worker-5-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/editso/elf-structure-study already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 1ee110899a74cde9d318f566627627720179017c745d89e0f2658592542818ce [INFO] running `Command { std: "docker" "start" "-a" "1ee110899a74cde9d318f566627627720179017c745d89e0f2658592542818ce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1ee110899a74cde9d318f566627627720179017c745d89e0f2658592542818ce", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1ee110899a74cde9d318f566627627720179017c745d89e0f2658592542818ce", kill_on_drop: false }` [INFO] [stdout] 1ee110899a74cde9d318f566627627720179017c745d89e0f2658592542818ce [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 18616b6a1246735ceebf68d3faaa5a826a32cbfae0131d89aa1114413f8c5852 [INFO] running `Command { std: "docker" "start" "-a" "18616b6a1246735ceebf68d3faaa5a826a32cbfae0131d89aa1114413f8c5852", 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 elf-parser v0.1.0 (/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 `elf_parser` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/elf.rs [INFO] [stderr] * src/parse.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/elf.rs:297:6 [INFO] [stderr] | [INFO] [stderr] 297 | ($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] --> src/elf.rs:323:6 [INFO] [stderr] | [INFO] [stderr] 323 | ($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] --> src/elf.rs:330:6 [INFO] [stderr] | [INFO] [stderr] 330 | ($b: expr_2021, $t: 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/elf.rs:330:21 [INFO] [stderr] | [INFO] [stderr] 330 | ($b: expr_2021, $t: 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/elf.rs:398:6 [INFO] [stderr] | [INFO] [stderr] 398 | ($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/elf.rs:405:6 [INFO] [stderr] | [INFO] [stderr] 405 | ($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/elf.rs:412:6 [INFO] [stderr] | [INFO] [stderr] 412 | ($s: expr_2021, $t: 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/elf.rs:412:21 [INFO] [stderr] | [INFO] [stderr] 412 | ($s: expr_2021, $t: 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] warning: unused variable: `name` [INFO] [stderr] --> src/parse.rs:468:14 [INFO] [stderr] | [INFO] [stderr] 468 | for (name, hdr) in self.secs.iter() { [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `idx` [INFO] [stderr] --> src/parse.rs:478:14 [INFO] [stderr] | [INFO] [stderr] 478 | for (idx, syms) in self.symtab.iter() { [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `st_bind` [INFO] [stderr] --> src/parse.rs:480:21 [INFO] [stderr] | [INFO] [stderr] 480 | let st_bind = ELF32_ST_BIND!(sym.st_info); [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_st_bind` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/parse.rs:493:32 [INFO] [stderr] | [INFO] [stderr] 493 | Reloc::Rel(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `r` [INFO] [stderr] --> src/parse.rs:493:35 [INFO] [stderr] | [INFO] [stderr] 493 | Reloc::Rel(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/parse.rs:494:33 [INFO] [stderr] | [INFO] [stderr] 494 | Reloc::Rela(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `r` [INFO] [stderr] --> src/parse.rs:494:36 [INFO] [stderr] | [INFO] [stderr] 494 | Reloc::Rela(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stderr] [INFO] [stderr] error: aborting due to 8 previous errors; 7 warnings emitted [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/elf.rs:297:10 [INFO] [stdout] | [INFO] [stdout] 297 | ($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] 297 | ($v: 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/elf.rs:323:10 [INFO] [stdout] | [INFO] [stdout] 323 | ($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] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 323 | ($v: 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/elf.rs:330:10 [INFO] [stdout] | [INFO] [stdout] 330 | ($b: expr, $t: 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] 330 | ($b: expr_2021, $t: 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/elf.rs:330:20 [INFO] [stdout] | [INFO] [stdout] 330 | ($b: expr, $t: 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] 330 | ($b: expr, $t: 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/elf.rs:398:10 [INFO] [stdout] | [INFO] [stdout] 398 | ($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] 398 | ($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/elf.rs:405:10 [INFO] [stdout] | [INFO] [stdout] 405 | ($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] 405 | ($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/elf.rs:412:10 [INFO] [stdout] | [INFO] [stdout] 412 | ($s: expr, $t: 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] 412 | ($s: expr_2021, $t: 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/elf.rs:412:20 [INFO] [stdout] | [INFO] [stdout] 412 | ($s: expr, $t: 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] 412 | ($s: expr, $t: expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ELF32_R_SYM`, `ELF32_R_TYPE`, and `Elf32_Word` [INFO] [stdout] --> src/parse.rs:9:79 [INFO] [stdout] | [INFO] [stdout] 9 | elf, Elf32_Addr, Elf32_Dyn, Elf32_Half, Elf32_Rel, Elf32_Rela, Elf32_Sym, Elf32_Word, Error, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 10 | ELF32_R_SYM, ELF32_R_TYPE, ELF32_ST_BIND, ELF32_ST_TYPE, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: extern blocks should be unsafe [INFO] [stdout] --> src/parse.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | extern "C" { [INFO] [stdout] | ^ [INFO] [stdout] | | [INFO] [stdout] | _________help: needs `unsafe` before the extern keyword: `unsafe` [INFO] [stdout] | | [INFO] [stdout] 433 | | [INFO] [stdout] 434 | | fn mmap( [INFO] [stdout] 435 | | addr: *const u8, [INFO] [stdout] ... | [INFO] [stdout] 441 | | ) -> *mut c_void; [INFO] [stdout] 442 | | } [INFO] [stdout] | |_________^ [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 #123743 [INFO] [stdout] = note: `--force-warn missing-unsafe-on-extern` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:377:9 [INFO] [stdout] | [INFO] [stdout] 377 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `--force-warn unsafe-op-in-unsafe-fn` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:383:9 [INFO] [stdout] | [INFO] [stdout] 383 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:382:5 [INFO] [stdout] | [INFO] [stdout] 382 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:389:9 [INFO] [stdout] | [INFO] [stdout] 389 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:388:5 [INFO] [stdout] | [INFO] [stdout] 388 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/parse.rs:469:14 [INFO] [stdout] | [INFO] [stdout] 469 | for (name, hdr) in self.secs.iter() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/parse.rs:479:14 [INFO] [stdout] | [INFO] [stdout] 479 | for (idx, syms) in self.symtab.iter() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `st_bind` [INFO] [stdout] --> src/parse.rs:481:21 [INFO] [stdout] | [INFO] [stdout] 481 | let st_bind = ELF32_ST_BIND!(sym.st_info); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_st_bind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:494:32 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:494:35 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:495:33 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:495:36 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `parse::ElfHeader::<'_>::load::mmap` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:444:18 [INFO] [stdout] | [INFO] [stdout] 444 | let mm = mmap( [INFO] [stdout] | __________________^ [INFO] [stdout] 445 | | std::ptr::null(), [INFO] [stdout] 446 | | (maxva - minva) as usize, [INFO] [stdout] 447 | | PROT_WRITE | PROT_EXEC | PROT_READ, [INFO] [stdout] ... | [INFO] [stdout] 450 | | 0, [INFO] [stdout] 451 | | ); [INFO] [stdout] | |_________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:408:5 [INFO] [stdout] | [INFO] [stdout] 408 | pub unsafe fn load(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::as_mut` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:453:18 [INFO] [stdout] | [INFO] [stdout] 453 | let mm = std::ptr::slice_from_raw_parts_mut(mm as *mut u8, (maxva - minva) as usize) [INFO] [stdout] | __________________^ [INFO] [stdout] 454 | | .as_mut() [INFO] [stdout] | |_____________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:500:17 [INFO] [stdout] | [INFO] [stdout] 500 | let f = std::mem::transmute::<_, extern "C" fn()>(mm[self.hdr.e_entry as usize..].as_ptr()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `got` is never read [INFO] [stdout] --> src/parse.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct ElfDynamic<'a> { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 33 | got: Ref< [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `strtab` and `dynamic` are never read [INFO] [stdout] --> src/parse.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 53 | pub struct ElfHeader<'a> { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 58 | strtab: Ref>, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | dynamic: Ref>>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 25 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] warning: failed to automatically apply fixes suggested by rustc to crate `elf_parser` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/elf.rs [INFO] [stderr] * src/parse.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/elf.rs:297:6 [INFO] [stderr] | [INFO] [stderr] 297 | ($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] --> src/elf.rs:323:6 [INFO] [stderr] | [INFO] [stderr] 323 | ($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] --> src/elf.rs:330:6 [INFO] [stderr] | [INFO] [stderr] 330 | ($b: expr_2021, $t: 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/elf.rs:330:21 [INFO] [stderr] | [INFO] [stderr] 330 | ($b: expr_2021, $t: 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/elf.rs:398:6 [INFO] [stderr] | [INFO] [stderr] 398 | ($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/elf.rs:405:6 [INFO] [stderr] | [INFO] [stderr] 405 | ($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/elf.rs:412:6 [INFO] [stderr] | [INFO] [stderr] 412 | ($s: expr_2021, $t: 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/elf.rs:412:21 [INFO] [stderr] | [INFO] [stderr] 412 | ($s: expr_2021, $t: expr_2021) => { [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/elf.rs:297:10 [INFO] [stdout] | [INFO] [stdout] 297 | ($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] 297 | ($v: expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/elf.rs:323:10 [INFO] [stdout] | [INFO] [stdout] 323 | ($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] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 323 | ($v: expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/elf.rs:330:10 [INFO] [stdout] | [INFO] [stdout] 330 | ($b: expr, $t: 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] 330 | ($b: expr_2021, $t: expr) => { [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] --> src/elf.rs:330:20 [INFO] [stdout] | [INFO] [stdout] 330 | ($b: expr, $t: 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] 330 | ($b: expr, $t: expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] = help: add `#![feature(expr_fragment_specifier_2024)]` to the crate attributes to enable [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/elf.rs:398:10 [INFO] [stdout] | [INFO] [stdout] 398 | ($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] 398 | ($i: expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [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/elf.rs:405:10 [INFO] [stdout] | [INFO] [stdout] 405 | ($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] 405 | ($i: expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/elf.rs:412:10 [INFO] [stdout] | [INFO] [stdout] 412 | ($s: expr, $t: 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] 412 | ($s: expr_2021, $t: expr) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: unused variable: `name` [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/elf.rs:412:20 [INFO] [stdout] | [INFO] [stdout] 412 | ($s: expr, $t: 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] 412 | ($s: expr, $t: expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] --> src/parse.rs:468:14 [INFO] [stdout] warning: unused imports: `ELF32_R_SYM`, `ELF32_R_TYPE`, and `Elf32_Word` [INFO] [stdout] --> src/parse.rs:9:79 [INFO] [stdout] | [INFO] [stdout] 9 | elf, Elf32_Addr, Elf32_Dyn, Elf32_Half, Elf32_Rel, Elf32_Rela, Elf32_Sym, Elf32_Word, Error, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 10 | ELF32_R_SYM, ELF32_R_TYPE, ELF32_ST_BIND, ELF32_ST_TYPE, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | [INFO] [stdout] warning: extern blocks should be unsafe [INFO] [stdout] --> src/parse.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | extern "C" { [INFO] [stdout] | ^ [INFO] [stdout] | | [INFO] [stdout] | _________help: needs `unsafe` before the extern keyword: `unsafe` [INFO] [stdout] | | [INFO] [stdout] 433 | | [INFO] [stdout] 434 | | fn mmap( [INFO] [stdout] 435 | | addr: *const u8, [INFO] [stdout] ... | [INFO] [stdout] 441 | | ) -> *mut c_void; [INFO] [stdout] 442 | | } [INFO] [stdout] | |_________^ [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 #123743 [INFO] [stdout] = note: `--force-warn missing-unsafe-on-extern` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] 468 | for (name, hdr) in self.secs.iter() { [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:377:9 [INFO] [stdout] | [INFO] [stdout] 377 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `--force-warn unsafe-op-in-unsafe-fn` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:383:9 [INFO] [stdout] | [INFO] [stdout] 383 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:382:5 [INFO] [stdout] | [INFO] [stdout] 382 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:389:9 [INFO] [stdout] | [INFO] [stdout] 389 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:388:5 [INFO] [stdout] | [INFO] [stdout] 388 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/parse.rs:469:14 [INFO] [stdout] | [INFO] [stdout] 469 | for (name, hdr) in self.secs.iter() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/parse.rs:479:14 [INFO] [stdout] | [INFO] [stdout] 479 | for (idx, syms) in self.symtab.iter() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: unused variable: `idx` [INFO] [stdout] warning: unused variable: `st_bind` [INFO] [stdout] --> src/parse.rs:481:21 [INFO] [stdout] | [INFO] [stdout] 481 | let st_bind = ELF32_ST_BIND!(sym.st_info); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_st_bind` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] --> src/parse.rs:478:14 [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:494:32 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:494:35 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] 478 | for (idx, syms) in self.symtab.iter() { [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:495:33 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:495:36 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] warning[E0133]: call to unsafe function `parse::ElfHeader::<'_>::load::mmap` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:444:18 [INFO] [stdout] | [INFO] [stdout] 444 | let mm = mmap( [INFO] [stdout] | __________________^ [INFO] [stdout] 445 | | std::ptr::null(), [INFO] [stdout] 446 | | (maxva - minva) as usize, [INFO] [stdout] 447 | | PROT_WRITE | PROT_EXEC | PROT_READ, [INFO] [stdout] ... | [INFO] [stdout] 450 | | 0, [INFO] [stdout] 451 | | ); [INFO] [stdout] | |_________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:408:5 [INFO] [stdout] | [INFO] [stdout] 408 | pub unsafe fn load(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: unused variable: `st_bind` [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::as_mut` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:453:18 [INFO] [stdout] | [INFO] [stdout] 453 | let mm = std::ptr::slice_from_raw_parts_mut(mm as *mut u8, (maxva - minva) as usize) [INFO] [stdout] | __________________^ [INFO] [stdout] 454 | | .as_mut() [INFO] [stdout] | |_____________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] --> src/parse.rs:480:21 [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:500:17 [INFO] [stdout] | [INFO] [stdout] 500 | let f = std::mem::transmute::<_, extern "C" fn()>(mm[self.hdr.e_entry as usize..].as_ptr()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | [INFO] [stdout] warning: field `got` is never read [INFO] [stdout] --> src/parse.rs:33:5 [INFO] [stdout] | [INFO] [stdout] 25 | pub struct ElfDynamic<'a> { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 33 | got: Ref< [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] 480 | let st_bind = ELF32_ST_BIND!(sym.st_info); [INFO] [stdout] warning: fields `strtab` and `dynamic` are never read [INFO] [stdout] --> src/parse.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 53 | pub struct ElfHeader<'a> { [INFO] [stdout] | --------- fields in this struct [INFO] [stdout] ... [INFO] [stdout] 58 | strtab: Ref>, [INFO] [stdout] | ^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 61 | dynamic: Ref>>, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_st_bind` [INFO] [stdout] warning: 25 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/parse.rs:493:32 [INFO] [stderr] | [INFO] [stderr] 493 | Reloc::Rel(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `r` [INFO] [stderr] --> src/parse.rs:493:35 [INFO] [stderr] | [INFO] [stderr] 493 | Reloc::Rel(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `n` [INFO] [stderr] --> src/parse.rs:494:33 [INFO] [stderr] | [INFO] [stderr] 494 | Reloc::Rela(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `r` [INFO] [stderr] --> src/parse.rs:494:36 [INFO] [stderr] | [INFO] [stderr] 494 | Reloc::Rela(n, r) => {} [INFO] [stderr] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stderr] [INFO] [stderr] error: aborting due to 8 previous errors; 7 warnings emitted [INFO] [stderr] [INFO] [stderr] For more information about this error, try `rustc --explain E0658`. [INFO] [stderr] Original diagnostics will follow. [INFO] [stderr] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.75s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking elf-parser v0.1.0 (/tmp/fixit) [INFO] [stdout] error: extern blocks must be unsafe [INFO] [stdout] --> src/parse.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | / extern "C" { [INFO] [stdout] 433 | | [INFO] [stdout] 434 | | fn mmap( [INFO] [stdout] 435 | | addr: *const u8, [INFO] [stdout] ... | [INFO] [stdout] 441 | | ) -> *mut c_void; [INFO] [stdout] 442 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ELF32_R_SYM`, `ELF32_R_TYPE`, and `Elf32_Word` [INFO] [stdout] --> src/parse.rs:9:79 [INFO] [stdout] | [INFO] [stdout] 9 | elf, Elf32_Addr, Elf32_Dyn, Elf32_Half, Elf32_Rel, Elf32_Rela, Elf32_Sym, Elf32_Word, Error, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 10 | ELF32_R_SYM, ELF32_R_TYPE, ELF32_ST_BIND, ELF32_ST_TYPE, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: extern blocks must be unsafe [INFO] [stdout] --> src/parse.rs:432:9 [INFO] [stdout] | [INFO] [stdout] 432 | / extern "C" { [INFO] [stdout] 433 | | [INFO] [stdout] 434 | | fn mmap( [INFO] [stdout] 435 | | addr: *const u8, [INFO] [stdout] ... | [INFO] [stdout] 441 | | ) -> *mut c_void; [INFO] [stdout] 442 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ELF32_R_SYM`, `ELF32_R_TYPE`, and `Elf32_Word` [INFO] [stdout] --> src/parse.rs:9:79 [INFO] [stdout] | [INFO] [stdout] 9 | elf, Elf32_Addr, Elf32_Dyn, Elf32_Half, Elf32_Rel, Elf32_Rela, Elf32_Sym, Elf32_Word, Error, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 10 | ELF32_R_SYM, ELF32_R_TYPE, ELF32_ST_BIND, ELF32_ST_TYPE, [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:377:9 [INFO] [stdout] | [INFO] [stdout] 377 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:383:9 [INFO] [stdout] | [INFO] [stdout] 383 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:382:5 [INFO] [stdout] | [INFO] [stdout] 382 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:389:9 [INFO] [stdout] | [INFO] [stdout] 389 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:388:5 [INFO] [stdout] | [INFO] [stdout] 388 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/parse.rs:469:14 [INFO] [stdout] | [INFO] [stdout] 469 | for (name, hdr) in self.secs.iter() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/parse.rs:479:14 [INFO] [stdout] | [INFO] [stdout] 479 | for (idx, syms) in self.symtab.iter() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `st_bind` [INFO] [stdout] --> src/parse.rs:481:21 [INFO] [stdout] | [INFO] [stdout] 481 | let st_bind = ELF32_ST_BIND!(sym.st_info); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_st_bind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:494:32 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:494:35 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:495:33 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:495:36 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `parse::ElfHeader::<'_>::load::mmap` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:444:18 [INFO] [stdout] | [INFO] [stdout] 444 | let mm = mmap( [INFO] [stdout] | __________________^ [INFO] [stdout] 445 | | std::ptr::null(), [INFO] [stdout] 446 | | (maxva - minva) as usize, [INFO] [stdout] 447 | | PROT_WRITE | PROT_EXEC | PROT_READ, [INFO] [stdout] ... | [INFO] [stdout] 450 | | 0, [INFO] [stdout] 451 | | ); [INFO] [stdout] | |_________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:408:5 [INFO] [stdout] | [INFO] [stdout] 408 | pub unsafe fn load(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::as_mut` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:453:18 [INFO] [stdout] | [INFO] [stdout] 453 | let mm = std::ptr::slice_from_raw_parts_mut(mm as *mut u8, (maxva - minva) as usize) [INFO] [stdout] | __________________^ [INFO] [stdout] 454 | | .as_mut() [INFO] [stdout] | |_____________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:500:17 [INFO] [stdout] | [INFO] [stdout] 500 | let f = std::mem::transmute::<_, extern "C" fn()>(mm[self.hdr.e_entry as usize..].as_ptr()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [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 1 previous error; 14 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] error: could not compile `elf-parser` (lib) due to 2 previous errors; 14 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:377:9 [INFO] [stdout] | [INFO] [stdout] 377 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:376:5 [INFO] [stdout] | [INFO] [stdout] 376 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:383:9 [INFO] [stdout] | [INFO] [stdout] 383 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:382:5 [INFO] [stdout] | [INFO] [stdout] 382 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:389:9 [INFO] [stdout] | [INFO] [stdout] 389 | std::mem::transmute(raw) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:388:5 [INFO] [stdout] | [INFO] [stdout] 388 | pub unsafe fn from_raw<'a>(raw: *const u8) -> &'a Self { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/parse.rs:469:14 [INFO] [stdout] | [INFO] [stdout] 469 | for (name, hdr) in self.secs.iter() { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `idx` [INFO] [stdout] --> src/parse.rs:479:14 [INFO] [stdout] | [INFO] [stdout] 479 | for (idx, syms) in self.symtab.iter() { [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_idx` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `st_bind` [INFO] [stdout] --> src/parse.rs:481:21 [INFO] [stdout] | [INFO] [stdout] 481 | let st_bind = ELF32_ST_BIND!(sym.st_info); [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_st_bind` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:494:32 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:494:35 [INFO] [stdout] | [INFO] [stdout] 494 | Reloc::Rel(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/parse.rs:495:33 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `r` [INFO] [stdout] --> src/parse.rs:495:36 [INFO] [stdout] | [INFO] [stdout] 495 | Reloc::Rela(n, r) => {} [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_r` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `parse::ElfHeader::<'_>::load::mmap` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:444:18 [INFO] [stdout] | [INFO] [stdout] 444 | let mm = mmap( [INFO] [stdout] | __________________^ [INFO] [stdout] 445 | | std::ptr::null(), [INFO] [stdout] 446 | | (maxva - minva) as usize, [INFO] [stdout] 447 | | PROT_WRITE | PROT_EXEC | PROT_READ, [INFO] [stdout] ... | [INFO] [stdout] 450 | | 0, [INFO] [stdout] 451 | | ); [INFO] [stdout] | |_________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/parse.rs:408:5 [INFO] [stdout] | [INFO] [stdout] 408 | pub unsafe fn load(&self) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::as_mut` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:453:18 [INFO] [stdout] | [INFO] [stdout] 453 | let mm = std::ptr::slice_from_raw_parts_mut(mm as *mut u8, (maxva - minva) as usize) [INFO] [stdout] | __________________^ [INFO] [stdout] 454 | | .as_mut() [INFO] [stdout] | |_____________________^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: consult the function's documentation for information on how to avoid undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::intrinsics::transmute` is unsafe and requires unsafe block [INFO] [stdout] --> src/parse.rs:500:17 [INFO] [stdout] | [INFO] [stdout] 500 | let f = std::mem::transmute::<_, extern "C" fn()>(mm[self.hdr.e_entry as usize..].as_ptr()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [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 1 previous error; 14 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stderr] error: could not compile `elf-parser` (lib test) due to 2 previous errors; 14 warnings emitted [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" "18616b6a1246735ceebf68d3faaa5a826a32cbfae0131d89aa1114413f8c5852", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "18616b6a1246735ceebf68d3faaa5a826a32cbfae0131d89aa1114413f8c5852", kill_on_drop: false }` [INFO] [stdout] 18616b6a1246735ceebf68d3faaa5a826a32cbfae0131d89aa1114413f8c5852