[INFO] fetching crate kg-js 0.9.0... [INFO] checking kg-js-0.9.0 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] extracting crate kg-js 0.9.0 into /workspace/builds/worker-0-tc2/source [INFO] validating manifest of crates.io crate kg-js 0.9.0 on toolchain ccf408f4326a858c00dd845a64a86b16f360a801 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking crates.io crate kg-js 0.9.0 [INFO] finished tweaking crates.io crate kg-js 0.9.0 [INFO] tweaked toml for crates.io crate kg-js 0.9.0 written to /workspace/builds/worker-0-tc2/source/Cargo.toml [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 19 packages to latest compatible versions [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-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 4fb144ffeeecefc333a5627bbf8560c3d5be861e169f3b96dac7e70f73801878 [INFO] running `Command { std: "docker" "start" "-a" "4fb144ffeeecefc333a5627bbf8560c3d5be861e169f3b96dac7e70f73801878", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "4fb144ffeeecefc333a5627bbf8560c3d5be861e169f3b96dac7e70f73801878", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4fb144ffeeecefc333a5627bbf8560c3d5be861e169f3b96dac7e70f73801878", kill_on_drop: false }` [INFO] [stdout] 4fb144ffeeecefc333a5627bbf8560c3d5be861e169f3b96dac7e70f73801878 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 2db1bbdc4dc213d66fd6933e866e7de3b7ec3e0cf70d2a45aa481345866a1881 [INFO] running `Command { std: "docker" "start" "-a" "2db1bbdc4dc213d66fd6933e866e7de3b7ec3e0cf70d2a45aa481345866a1881", 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] Fixed Cargo.toml (1 fix) [INFO] [stderr] Compiling proc-macro2 v1.0.86 [INFO] [stderr] Compiling unicode-ident v1.0.13 [INFO] [stderr] Compiling libc v0.2.159 [INFO] [stderr] Compiling shlex v1.3.0 [INFO] [stderr] Compiling serde v1.0.210 [INFO] [stderr] Compiling smallbox v0.8.4 [INFO] [stderr] Compiling serde_json v1.0.128 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking itoa v1.0.11 [INFO] [stderr] Checking memchr v2.7.4 [INFO] [stderr] Checking bitflags v2.6.0 [INFO] [stderr] Checking ryu v1.0.18 [INFO] [stderr] Checking log v0.4.22 [INFO] [stderr] Compiling quote v1.0.37 [INFO] [stderr] Compiling jobserver v0.1.32 [INFO] [stderr] Compiling syn v2.0.77 [INFO] [stderr] Compiling cc v1.1.21 [INFO] [stderr] Compiling kg-js v0.9.0 (/tmp/fixit) [INFO] [stderr] Migrating build.rs from 2021 edition to 2024 [INFO] [stderr] Compiling serde_derive v1.0.210 [INFO] [stderr] Compiling smart-default v0.7.1 [INFO] [stderr] Migrating src/lib.rs from 2021 edition to 2024 [INFO] [stderr] warning: failed to automatically apply fixes suggested by rustc to crate `kg_js` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/ctx.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/ctx.rs:5:6 [INFO] [stderr] | [INFO] [stderr] 5 | ($res: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 1 previous error [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: extern blocks should be unsafe [INFO] [stdout] --> src/bindings.rs:116:1 [INFO] [stdout] | [INFO] [stdout] 116 | extern "C" { [INFO] [stdout] | ^ [INFO] [stdout] | | [INFO] [stdout] | _help: needs `unsafe` before the extern keyword: `unsafe` [INFO] [stdout] | | [INFO] [stdout] 117 | | pub fn duk_api_version() -> u32; [INFO] [stdout] 118 | | pub fn duk_api_git_describe() -> *const c_char; [INFO] [stdout] 119 | | pub fn duk_api_git_commit() -> *const c_char; [INFO] [stdout] ... | [INFO] [stdout] 236 | | pub fn duk_gc(ctx: *mut duk_context, flags: u32); [INFO] [stdout] 237 | | } [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: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/ctx.rs:5:11 [INFO] [stdout] | [INFO] [stdout] 5 | ($res:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] = note: `--force-warn edition-2024-expr-fragment-specifier` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 5 | ($res:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/bindings.rs:242:10 [INFO] [stdout] | [INFO] [stdout] 242 | &mut (*(udata as *mut Userdata)).interop [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/bindings.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | unsafe fn interop<'a>(udata: *mut c_void) -> &'a mut InteropRef { [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::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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/alloc.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub unsafe fn alloc(size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | let ptr = std::alloc::alloc(layout); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | ptr.offset(size_of::() as isize) [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | alloc(size) [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/alloc.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | pub unsafe fn realloc(ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | let ptr = ptr.offset(-(size_of::() as isize)); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | let old_size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | let layout = Layout::from_size_align_unchecked(old_size, size_of::()); [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::alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 23 | let ptr = std::alloc::realloc(ptr, layout, size); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | ptr.offset(size_of::() as isize) [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::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | let ptr = ptr.offset(-(size_of::() as isize)); [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/alloc.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | pub unsafe fn free(ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | let size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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::alloc::dealloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | std::alloc::dealloc(ptr, layout); [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | super::alloc::alloc(size) [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/interop.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | unsafe fn alloc(&mut self, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | super::alloc::realloc(ptr, size) [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/interop.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | unsafe fn realloc(&mut self, ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::free` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | super::alloc::free(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] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/interop.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | unsafe fn free(&mut self, ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 21 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 `kg_js` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/ctx.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/ctx.rs:5:6 [INFO] [stderr] | [INFO] [stderr] 5 | ($res: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 1 previous error [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: extern blocks should be unsafe [INFO] [stdout] --> src/bindings.rs:116:1 [INFO] [stdout] | [INFO] [stdout] 116 | extern "C" { [INFO] [stdout] | ^ [INFO] [stdout] | | [INFO] [stdout] | _help: needs `unsafe` before the extern keyword: `unsafe` [INFO] [stdout] | | [INFO] [stdout] 117 | | pub fn duk_api_version() -> u32; [INFO] [stdout] 118 | | pub fn duk_api_git_describe() -> *const c_char; [INFO] [stdout] 119 | | pub fn duk_api_git_commit() -> *const c_char; [INFO] [stdout] ... | [INFO] [stdout] 236 | | pub fn duk_gc(ctx: *mut duk_context, flags: u32); [INFO] [stdout] 237 | | } [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: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/ctx.rs:5:11 [INFO] [stdout] | [INFO] [stdout] 5 | ($res:expr) => { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see Migration Guide [INFO] [stdout] = note: `--force-warn edition-2024-expr-fragment-specifier` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: to keep the existing behavior, use the `expr_2021` fragment specifier [INFO] [stdout] | [INFO] [stdout] 5 | ($res:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/bindings.rs:242:10 [INFO] [stdout] | [INFO] [stdout] 242 | &mut (*(udata as *mut Userdata)).interop [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/bindings.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | unsafe fn interop<'a>(udata: *mut c_void) -> &'a mut InteropRef { [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::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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/alloc.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub unsafe fn alloc(size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | let ptr = std::alloc::alloc(layout); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | ptr.offset(size_of::() as isize) [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | alloc(size) [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/alloc.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | pub unsafe fn realloc(ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | let ptr = ptr.offset(-(size_of::() as isize)); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | let old_size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | let layout = Layout::from_size_align_unchecked(old_size, size_of::()); [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::alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 23 | let ptr = std::alloc::realloc(ptr, layout, size); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | ptr.offset(size_of::() as isize) [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::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | let ptr = ptr.offset(-(size_of::() as isize)); [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/alloc.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | pub unsafe fn free(ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | let size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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::alloc::dealloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | std::alloc::dealloc(ptr, layout); [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | super::alloc::alloc(size) [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/interop.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | unsafe fn alloc(&mut self, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | super::alloc::realloc(ptr, size) [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/interop.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | unsafe fn realloc(&mut self, ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::free` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | super::alloc::free(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] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/interop.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | unsafe fn free(&mut self, ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:113:23 [INFO] [stdout] | [INFO] [stdout] 113 | let ptr = crate::alloc::alloc(size); [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/interop.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | unsafe fn alloc(&mut self, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:121:27 [INFO] [stdout] | [INFO] [stdout] 121 | let new_ptr = crate::alloc::realloc(ptr, size); [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/interop.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | unsafe fn realloc(&mut self, ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::free` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | crate::alloc::free(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] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/interop.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | unsafe fn free(&mut self, ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `alloc_count` is never used [INFO] [stdout] --> src/interop.rs:274:20 [INFO] [stdout] | [INFO] [stdout] 247 | impl AllocTracker { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 274 | pub fn alloc_count(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [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] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.45s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Compiling kg-js v0.9.0 (/tmp/fixit) [INFO] [stdout] error: extern blocks must be unsafe [INFO] [stdout] --> src/bindings.rs:116:1 [INFO] [stdout] | [INFO] [stdout] 116 | / extern "C" { [INFO] [stdout] 117 | | pub fn duk_api_version() -> u32; [INFO] [stdout] 118 | | pub fn duk_api_git_describe() -> *const c_char; [INFO] [stdout] 119 | | pub fn duk_api_git_commit() -> *const c_char; [INFO] [stdout] ... | [INFO] [stdout] 236 | | pub fn duk_gc(ctx: *mut duk_context, flags: u32); [INFO] [stdout] 237 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: extern blocks must be unsafe [INFO] [stdout] --> src/bindings.rs:116:1 [INFO] [stdout] | [INFO] [stdout] 116 | / extern "C" { [INFO] [stdout] 117 | | pub fn duk_api_version() -> u32; [INFO] [stdout] 118 | | pub fn duk_api_git_describe() -> *const c_char; [INFO] [stdout] 119 | | pub fn duk_api_git_commit() -> *const c_char; [INFO] [stdout] ... | [INFO] [stdout] 236 | | pub fn duk_gc(ctx: *mut duk_context, flags: u32); [INFO] [stdout] 237 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/bindings.rs:242:10 [INFO] [stdout] | [INFO] [stdout] 242 | &mut (*(udata as *mut Userdata)).interop [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/bindings.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | unsafe fn interop<'a>(udata: *mut c_void) -> &'a mut InteropRef { [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::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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/alloc.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub unsafe fn alloc(size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | let ptr = std::alloc::alloc(layout); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | ptr.offset(size_of::() as isize) [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | alloc(size) [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/alloc.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | pub unsafe fn realloc(ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | let ptr = ptr.offset(-(size_of::() as isize)); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | let old_size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | let layout = Layout::from_size_align_unchecked(old_size, size_of::()); [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::alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 23 | let ptr = std::alloc::realloc(ptr, layout, size); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | ptr.offset(size_of::() as isize) [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::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | let ptr = ptr.offset(-(size_of::() as isize)); [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/alloc.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | pub unsafe fn free(ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | let size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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::alloc::dealloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | std::alloc::dealloc(ptr, layout); [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | super::alloc::alloc(size) [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/interop.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | unsafe fn alloc(&mut self, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | super::alloc::realloc(ptr, size) [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/interop.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | unsafe fn realloc(&mut self, ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::free` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | super::alloc::free(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] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/interop.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | unsafe fn free(&mut self, ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 19 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 `kg-js` (lib) due to 2 previous errors; 19 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/bindings.rs:242:10 [INFO] [stdout] | [INFO] [stdout] 242 | &mut (*(udata as *mut Userdata)).interop [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/bindings.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | unsafe fn interop<'a>(udata: *mut c_void) -> &'a mut InteropRef { [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::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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/alloc.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub unsafe fn alloc(size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:7:15 [INFO] [stdout] | [INFO] [stdout] 7 | let ptr = std::alloc::alloc(layout); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | ptr.offset(size_of::() as isize) [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | alloc(size) [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/alloc.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | pub unsafe fn realloc(ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:20:19 [INFO] [stdout] | [INFO] [stdout] 20 | let ptr = ptr.offset(-(size_of::() as isize)); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:21:24 [INFO] [stdout] | [INFO] [stdout] 21 | let old_size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:22:22 [INFO] [stdout] | [INFO] [stdout] 22 | let layout = Layout::from_size_align_unchecked(old_size, size_of::()); [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::alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:23:19 [INFO] [stdout] | [INFO] [stdout] 23 | let ptr = std::alloc::realloc(ptr, layout, size); [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]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:27:9 [INFO] [stdout] | [INFO] [stdout] 27 | *(ptr as *mut usize) = size; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | ptr.offset(size_of::() as isize) [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::ptr::mut_ptr::::offset` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:36:15 [INFO] [stdout] | [INFO] [stdout] 36 | let ptr = ptr.offset(-(size_of::() as isize)); [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/alloc.rs:32:1 [INFO] [stdout] | [INFO] [stdout] 32 | pub unsafe fn free(ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:37:16 [INFO] [stdout] | [INFO] [stdout] 37 | let size = *(ptr as *mut usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer [INFO] [stdout] | [INFO] [stdout] = note: for more information, see issue #71668 [INFO] [stdout] = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::alloc::Layout::from_size_align_unchecked` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:38:18 [INFO] [stdout] | [INFO] [stdout] 38 | let layout = Layout::from_size_align_unchecked(size, size_of::()); [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::alloc::dealloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/alloc.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | std::alloc::dealloc(ptr, layout); [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 `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | super::alloc::alloc(size) [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/interop.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | unsafe fn alloc(&mut self, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:13:9 [INFO] [stdout] | [INFO] [stdout] 13 | super::alloc::realloc(ptr, size) [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/interop.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | unsafe fn realloc(&mut self, ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::free` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:17:9 [INFO] [stdout] | [INFO] [stdout] 17 | super::alloc::free(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] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/interop.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | unsafe fn free(&mut self, ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::alloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:113:23 [INFO] [stdout] | [INFO] [stdout] 113 | let ptr = crate::alloc::alloc(size); [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/interop.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | unsafe fn alloc(&mut self, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::realloc` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:121:27 [INFO] [stdout] | [INFO] [stdout] 121 | let new_ptr = crate::alloc::realloc(ptr, size); [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/interop.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | unsafe fn realloc(&mut self, ptr: *mut u8, size: usize) -> *mut u8 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `alloc::free` is unsafe and requires unsafe block [INFO] [stdout] --> src/interop.rs:129:13 [INFO] [stdout] | [INFO] [stdout] 129 | crate::alloc::free(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] note: an unsafe function restricts its caller, but its body is safe by default [INFO] [stdout] --> src/interop.rs:127:9 [INFO] [stdout] | [INFO] [stdout] 127 | unsafe fn free(&mut self, ptr: *mut u8) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 22 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 `kg-js` (lib test) due to 2 previous errors; 22 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" "2db1bbdc4dc213d66fd6933e866e7de3b7ec3e0cf70d2a45aa481345866a1881", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2db1bbdc4dc213d66fd6933e866e7de3b7ec3e0cf70d2a45aa481345866a1881", kill_on_drop: false }` [INFO] [stdout] 2db1bbdc4dc213d66fd6933e866e7de3b7ec3e0cf70d2a45aa481345866a1881