[INFO] fetching crate modular-native 0.1.1... [INFO] checking modular-native-0.1.1 against try#ccf408f4326a858c00dd845a64a86b16f360a801 for pr-129466-2 [INFO] extracting crate modular-native 0.1.1 into /workspace/builds/worker-4-tc2/source [INFO] validating manifest of crates.io crate modular-native 0.1.1 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 modular-native 0.1.1 [INFO] finished tweaking crates.io crate modular-native 0.1.1 [INFO] tweaked toml for crates.io crate modular-native 0.1.1 written to /workspace/builds/worker-4-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 85 packages to latest compatible versions [INFO] [stderr] Adding async-channel v1.9.0 (available: v2.3.1) [INFO] [stderr] Adding event-listener v2.5.3 (available: v5.3.1) [INFO] [stderr] Adding hermit-abi v0.3.9 (available: v0.4.0) [INFO] [stderr] Adding nu-ansi-term v0.46.0 (available: v0.50.1) [INFO] [stderr] Adding tower v0.4.13 (available: v0.5.1) [INFO] [stderr] Adding wasi v0.11.0+wasi-snapshot-preview1 (available: v0.13.2+wasi-0.2.1) [INFO] [stderr] Adding windows-sys v0.52.0 (available: v0.59.0) [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-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 482d7f1c7b97239c9df7e48cbc0c3440f160e00df66b699a70ee28e967ce65d5 [INFO] running `Command { std: "docker" "start" "-a" "482d7f1c7b97239c9df7e48cbc0c3440f160e00df66b699a70ee28e967ce65d5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "482d7f1c7b97239c9df7e48cbc0c3440f160e00df66b699a70ee28e967ce65d5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "482d7f1c7b97239c9df7e48cbc0c3440f160e00df66b699a70ee28e967ce65d5", kill_on_drop: false }` [INFO] [stdout] 482d7f1c7b97239c9df7e48cbc0c3440f160e00df66b699a70ee28e967ce65d5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+ccf408f4326a858c00dd845a64a86b16f360a801" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] e2668a29271d70913993772999bf5d08ece2b6faab01ca610ab1556dae443942 [INFO] running `Command { std: "docker" "start" "-a" "e2668a29271d70913993772999bf5d08ece2b6faab01ca610ab1556dae443942", 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 futures-sink v0.3.30 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling crossbeam-utils v0.8.20 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling pin-project-internal v1.1.5 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking minimal-lexical v0.2.1 [INFO] [stderr] Checking modular-sys v0.1.0 [INFO] [stderr] Checking futures-channel v0.3.30 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking tokio v1.40.0 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Checking concurrent-queue v2.5.0 [INFO] [stderr] Checking tracing-subscriber v0.3.18 [INFO] [stderr] Checking async-channel v1.9.0 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Checking pin-project v1.1.5 [INFO] [stderr] Checking futures-executor v0.3.30 [INFO] [stderr] Checking tower v0.4.13 [INFO] [stderr] Checking futures v0.3.30 [INFO] [stderr] Checking modular-rs v0.1.0 [INFO] [stderr] Checking modular-native v0.1.1 (/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 `modular_native` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/lib.rs [INFO] [stderr] * src/module.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/lib.rs:25:6 [INFO] [stderr] | [INFO] [stderr] 25 | ($arg: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/lib.rs:32:6 [INFO] [stderr] | [INFO] [stderr] 32 | ($arg: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: unnecessary `unsafe` block [INFO] [stderr] --> src/lib.rs:26:9 [INFO] [stderr] | [INFO] [stderr] 26 | unsafe { cstr_to_str!($arg).map(|i| i.to_string()) } [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] | [INFO] [stderr] ::: src/module.rs:59:79 [INFO] [stderr] | [INFO] [stderr] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { unsafe { [INFO] [stderr] | ------ because it's nested under this `unsafe` block [INFO] [stderr] ... [INFO] [stderr] 65 | name: cstr_to_string!(err.name), [INFO] [stderr] | ------------------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_unsafe)]` on by default [INFO] [stderr] = note: this warning originates in the macro `cstr_to_string` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/lib.rs:26:9 [INFO] [stderr] | [INFO] [stderr] 26 | unsafe { cstr_to_str!($arg).map(|i| i.to_string()) } [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] | [INFO] [stderr] ::: src/module.rs:59:79 [INFO] [stderr] | [INFO] [stderr] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { unsafe { [INFO] [stderr] | ------ because it's nested under this `unsafe` block [INFO] [stderr] ... [INFO] [stderr] 66 | message: cstr_to_string!(err.message), [INFO] [stderr] | ---------------------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this warning originates in the macro `cstr_to_string` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors; 2 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: unsafe attribute used without unsafe [INFO] [stdout] --> src/lib.rs:66:3 [INFO] [stdout] | [INFO] [stdout] 66 | #[no_mangle] [INFO] [stdout] | ^^^^^^^^^ usage of unsafe attribute [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 #123757 [INFO] [stdout] = note: `--force-warn unsafe-attr-outside-unsafe` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: wrap the attribute in `unsafe(...)` [INFO] [stdout] | [INFO] [stdout] 66 | #[unsafe(no_mangle)] [INFO] [stdout] | +++++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/lib.rs:25:11 [INFO] [stdout] | [INFO] [stdout] 25 | ($arg: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] 25 | ($arg: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/lib.rs:32:11 [INFO] [stdout] | [INFO] [stdout] 32 | ($arg: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] 32 | ($arg:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | unsafe extern "system" fn on_success(ptr: Obj, data: CBuf) { [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | let slice = std::slice::from_raw_parts(data.data, data.len); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:60:29 [INFO] [stdout] | [INFO] [stdout] 60 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | unsafe extern "system" fn on_unknown_method(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:84:29 [INFO] [stdout] | [INFO] [stdout] 84 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | unsafe extern "system" fn on_destroyed(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | let _ = Box::from_raw(modular); [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/lib.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | pub unsafe extern "system" fn __modular_destroy(modular: *mut NativeModular) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 197 | let Some(topic) = cstr_to_str!(subscribe.topic) else { [INFO] [stdout] | ----------------------------- in this macro invocation [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/lib.rs:192:1 [INFO] [stdout] | [INFO] [stdout] 192 | / pub unsafe extern "system" fn __modular_events_subscribe( [INFO] [stdout] 193 | | modular: &NativeModular, [INFO] [stdout] 194 | | subscribe: CSubscribe, [INFO] [stdout] 195 | | subscription: *mut CSubscriptionRef, [INFO] [stdout] 196 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | *subscription = subscription_ref; [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::drop_in_place` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | drop_in_place(subscription_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[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 246 | let topic = cstr_to_str!(topic).expect("topic must not be null"); [INFO] [stdout] | ------------------- in this macro invocation [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/lib.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | / pub unsafe extern "system" fn __modular_events_publish( [INFO] [stdout] 242 | | modular: &NativeModular, [INFO] [stdout] 243 | | topic: *const c_char, [INFO] [stdout] 244 | | buf: CBuf, [INFO] [stdout] 245 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:247:40 [INFO] [stdout] | [INFO] [stdout] 247 | let bytes = Bytes::copy_from_slice(std::slice::from_raw_parts(buf.data, buf.len)); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | let _ = Box::from_raw(subscription.0 as *mut Subscription); [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/lib.rs:252:1 [INFO] [stdout] | [INFO] [stdout] 252 | pub unsafe extern "system" fn __modular_events_unsubscribe(subscription: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 265 | let name = cstr_to_str!(name).expect("module name can't be null"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:259:1 [INFO] [stdout] | [INFO] [stdout] 259 | / pub unsafe extern "system" fn __modular_register_module( [INFO] [stdout] 260 | | modular: &NativeModular, [INFO] [stdout] 261 | | name: *const c_char, [INFO] [stdout] 262 | | module: CModule, [INFO] [stdout] 263 | | replace: bool, [INFO] [stdout] 264 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 289 | if let Some(v) = cstr_to_str!(name) { [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / pub unsafe extern "system" fn __modular_remove_module( [INFO] [stdout] 286 | | modular: &NativeModular, [INFO] [stdout] 287 | | name: *const c_char, [INFO] [stdout] 288 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 310 | let name = cstr_to_str!(name).expect("name can't be empty"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:294:1 [INFO] [stdout] | [INFO] [stdout] 294 | / pub unsafe extern "system" fn __modular_get_module_ref( [INFO] [stdout] 295 | | modular: &NativeModular, [INFO] [stdout] 296 | | name: *const c_char, [INFO] [stdout] 297 | | ) -> CModuleRef { [INFO] [stdout] | |_______________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:324:18 [INFO] [stdout] | [INFO] [stdout] 324 | let v = &*(ptr.0 as *mut RtModule); [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/lib.rs:323:5 [INFO] [stdout] | [INFO] [stdout] 323 | unsafe extern "system" fn clone(ptr: Obj) -> CModuleRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | let _ = Box::from_raw(ptr.0 as *mut RtModule); [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/lib.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 333 | unsafe extern "system" fn drop(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:343:44 [INFO] [stdout] | [INFO] [stdout] 343 | let RtModule { runtime, module } = (*(ptr.0 as *mut RtModule)).clone(); [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/lib.rs:337:5 [INFO] [stdout] | [INFO] [stdout] 337 | / unsafe extern "system" fn invoke( [INFO] [stdout] 338 | | ptr: Obj, [INFO] [stdout] 339 | | action: *const c_char, [INFO] [stdout] 340 | | data: CBuf, [INFO] [stdout] 341 | | callback: CCallback, [INFO] [stdout] 342 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:345:22 [INFO] [stdout] | [INFO] [stdout] 345 | let action = CStr::from_ptr(action).to_string_lossy().to_string(); [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:346:43 [INFO] [stdout] | [INFO] [stdout] 346 | let data = Bytes::copy_from_slice(std::slice::from_raw_parts(data.data, data.len)); [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:358:29 [INFO] [stdout] | [INFO] [stdout] 358 | ... (callback.success)(callback.ptr, buf) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:361:59 [INFO] [stdout] | [INFO] [stdout] 361 | ... ModuleError::UnknownMethod => (callback.unknown_method)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... (callback.error)(callback.ptr, module_error) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:374:55 [INFO] [stdout] | [INFO] [stdout] 374 | ... ModuleError::Destroyed => (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:378:48 [INFO] [stdout] | [INFO] [stdout] 378 | on_drop: Some(Box::new(move || (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | (callback.destroyed)(callback.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: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/lib.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | if let Some(v) = self.close_flag.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/lib.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | } [INFO] [stdout] | ^ [INFO] [stdout] = note: `--force-warn if-let-rescope` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 181 ~ match self.close_flag.upgrade() { Some(v) => { [INFO] [stdout] 182 | let mut guard = v.write(); [INFO] [stdout] ... [INFO] [stdout] 187 | } [INFO] [stdout] 188 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/lib.rs:348:12 [INFO] [stdout] | [INFO] [stdout] 348 | if let Some(v) = runtime.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^----------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/lib.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | } else { [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 348 ~ match runtime.upgrade() { Some(v) => { [INFO] [stdout] 349 | let task = ModuleTask { [INFO] [stdout] ... [INFO] [stdout] 381 | v.spawn(task); [INFO] [stdout] 382 ~ } _ => { [INFO] [stdout] 383 | (callback.destroyed)(callback.ptr) [INFO] [stdout] 384 ~ }} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/lib.rs:408:12 [INFO] [stdout] | [INFO] [stdout] 408 | if let Some(f) = self.on_drop.take() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/lib.rs:410:9 [INFO] [stdout] | [INFO] [stdout] 410 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 408 ~ match self.on_drop.take() { Some(f) => { [INFO] [stdout] 409 | f() [INFO] [stdout] 410 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:50:20 [INFO] [stdout] | [INFO] [stdout] 50 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 50 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 51 | let slice = std::slice::from_raw_parts(data.data, data.len); [INFO] [stdout] ... [INFO] [stdout] 55 | state.waker.wake(); [INFO] [stdout] 56 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 62 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 63 | let err = ModuleError::Custom(CustomModuleError { [INFO] [stdout] ... [INFO] [stdout] 70 | state.waker.wake(); [INFO] [stdout] 71 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 77 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 78 | *v.write() = Some(Err(ModuleError::UnknownMethod)); [INFO] [stdout] 79 | state.waker.wake(); [INFO] [stdout] 80 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:86:20 [INFO] [stdout] | [INFO] [stdout] 86 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 86 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 87 | *v.write() = Some(Err(ModuleError::Destroyed)); [INFO] [stdout] 88 | state.waker.wake(); [INFO] [stdout] 89 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:131:12 [INFO] [stdout] | [INFO] [stdout] 131 | if let Some(v) = self.data.write().take() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------------------ [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | } else { [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 131 ~ match self.data.write().take() { Some(v) => { [INFO] [stdout] 132 | Poll::Ready(v.map(ModuleResponse::new)) [INFO] [stdout] 133 ~ } _ => { [INFO] [stdout] 134 | Poll::Pending [INFO] [stdout] 135 ~ }} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 37 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 `modular_native` [INFO] [stderr] [INFO] [stderr] after fixes were automatically applied the compiler reported errors within these files: [INFO] [stderr] [INFO] [stderr] * src/lib.rs [INFO] [stderr] * src/module.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/lib.rs:25:6 [INFO] [stderr] | [INFO] [stderr] 25 | ($arg: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/lib.rs:32:6 [INFO] [stderr] | [INFO] [stderr] 32 | ($arg: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: unnecessary `unsafe` block [INFO] [stderr] --> src/lib.rs:26:9 [INFO] [stderr] | [INFO] [stderr] 26 | unsafe { cstr_to_str!($arg).map(|i| i.to_string()) } [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] | [INFO] [stderr] ::: src/module.rs:59:79 [INFO] [stderr] | [INFO] [stderr] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { unsafe { [INFO] [stderr] | ------ because it's nested under this `unsafe` block [INFO] [stderr] ... [INFO] [stderr] 65 | name: cstr_to_string!(err.name), [INFO] [stderr] | ------------------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_unsafe)]` on by default [INFO] [stderr] = note: this warning originates in the macro `cstr_to_string` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: unnecessary `unsafe` block [INFO] [stderr] --> src/lib.rs:26:9 [INFO] [stderr] | [INFO] [stderr] 26 | unsafe { cstr_to_str!($arg).map(|i| i.to_string()) } [INFO] [stderr] | ^^^^^^ unnecessary `unsafe` block [INFO] [stderr] | [INFO] [stderr] ::: src/module.rs:59:79 [INFO] [stderr] | [INFO] [stderr] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { unsafe { [INFO] [stderr] | ------ because it's nested under this `unsafe` block [INFO] [stderr] ... [INFO] [stderr] 66 | message: cstr_to_string!(err.message), [INFO] [stderr] | ---------------------------- in this macro invocation [INFO] [stderr] | [INFO] [stderr] = note: this warning originates in the macro `cstr_to_string` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: aborting due to 2 previous errors; 2 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: unsafe attribute used without unsafe [INFO] [stdout] --> src/lib.rs:66:3 [INFO] [stdout] | [INFO] [stdout] 66 | #[no_mangle] [INFO] [stdout] | ^^^^^^^^^ usage of unsafe attribute [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 #123757 [INFO] [stdout] = note: `--force-warn unsafe-attr-outside-unsafe` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: wrap the attribute in `unsafe(...)` [INFO] [stdout] | [INFO] [stdout] 66 | #[unsafe(no_mangle)] [INFO] [stdout] | +++++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the `expr` fragment specifier will accept more expressions in the 2024 edition [INFO] [stdout] --> src/lib.rs:25:11 [INFO] [stdout] | [INFO] [stdout] 25 | ($arg: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] 25 | ($arg: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/lib.rs:32:11 [INFO] [stdout] | [INFO] [stdout] 32 | ($arg: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] 32 | ($arg:expr_2021) => { [INFO] [stdout] | ~~~~~~~~~ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | unsafe extern "system" fn on_success(ptr: Obj, data: CBuf) { [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | let slice = std::slice::from_raw_parts(data.data, data.len); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:60:29 [INFO] [stdout] | [INFO] [stdout] 60 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | unsafe extern "system" fn on_unknown_method(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:84:29 [INFO] [stdout] | [INFO] [stdout] 84 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | unsafe extern "system" fn on_destroyed(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | let _ = Box::from_raw(modular); [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/lib.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | pub unsafe extern "system" fn __modular_destroy(modular: *mut NativeModular) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 197 | let Some(topic) = cstr_to_str!(subscribe.topic) else { [INFO] [stdout] | ----------------------------- in this macro invocation [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/lib.rs:192:1 [INFO] [stdout] | [INFO] [stdout] 192 | / pub unsafe extern "system" fn __modular_events_subscribe( [INFO] [stdout] 193 | | modular: &NativeModular, [INFO] [stdout] 194 | | subscribe: CSubscribe, [INFO] [stdout] 195 | | subscription: *mut CSubscriptionRef, [INFO] [stdout] 196 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | *subscription = subscription_ref; [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::drop_in_place` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | drop_in_place(subscription_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[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 246 | let topic = cstr_to_str!(topic).expect("topic must not be null"); [INFO] [stdout] | ------------------- in this macro invocation [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/lib.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | / pub unsafe extern "system" fn __modular_events_publish( [INFO] [stdout] 242 | | modular: &NativeModular, [INFO] [stdout] 243 | | topic: *const c_char, [INFO] [stdout] 244 | | buf: CBuf, [INFO] [stdout] 245 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:247:40 [INFO] [stdout] | [INFO] [stdout] 247 | let bytes = Bytes::copy_from_slice(std::slice::from_raw_parts(buf.data, buf.len)); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | let _ = Box::from_raw(subscription.0 as *mut Subscription); [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/lib.rs:252:1 [INFO] [stdout] | [INFO] [stdout] 252 | pub unsafe extern "system" fn __modular_events_unsubscribe(subscription: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 265 | let name = cstr_to_str!(name).expect("module name can't be null"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:259:1 [INFO] [stdout] | [INFO] [stdout] 259 | / pub unsafe extern "system" fn __modular_register_module( [INFO] [stdout] 260 | | modular: &NativeModular, [INFO] [stdout] 261 | | name: *const c_char, [INFO] [stdout] 262 | | module: CModule, [INFO] [stdout] 263 | | replace: bool, [INFO] [stdout] 264 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 289 | if let Some(v) = cstr_to_str!(name) { [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / pub unsafe extern "system" fn __modular_remove_module( [INFO] [stdout] 286 | | modular: &NativeModular, [INFO] [stdout] 287 | | name: *const c_char, [INFO] [stdout] 288 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 310 | let name = cstr_to_str!(name).expect("name can't be empty"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:294:1 [INFO] [stdout] | [INFO] [stdout] 294 | / pub unsafe extern "system" fn __modular_get_module_ref( [INFO] [stdout] 295 | | modular: &NativeModular, [INFO] [stdout] 296 | | name: *const c_char, [INFO] [stdout] 297 | | ) -> CModuleRef { [INFO] [stdout] | |_______________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:324:18 [INFO] [stdout] | [INFO] [stdout] 324 | let v = &*(ptr.0 as *mut RtModule); [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/lib.rs:323:5 [INFO] [stdout] | [INFO] [stdout] 323 | unsafe extern "system" fn clone(ptr: Obj) -> CModuleRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | let _ = Box::from_raw(ptr.0 as *mut RtModule); [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/lib.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 333 | unsafe extern "system" fn drop(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:343:44 [INFO] [stdout] | [INFO] [stdout] 343 | let RtModule { runtime, module } = (*(ptr.0 as *mut RtModule)).clone(); [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/lib.rs:337:5 [INFO] [stdout] | [INFO] [stdout] 337 | / unsafe extern "system" fn invoke( [INFO] [stdout] 338 | | ptr: Obj, [INFO] [stdout] 339 | | action: *const c_char, [INFO] [stdout] 340 | | data: CBuf, [INFO] [stdout] 341 | | callback: CCallback, [INFO] [stdout] 342 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:345:22 [INFO] [stdout] | [INFO] [stdout] 345 | let action = CStr::from_ptr(action).to_string_lossy().to_string(); [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:346:43 [INFO] [stdout] | [INFO] [stdout] 346 | let data = Bytes::copy_from_slice(std::slice::from_raw_parts(data.data, data.len)); [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:358:29 [INFO] [stdout] | [INFO] [stdout] 358 | ... (callback.success)(callback.ptr, buf) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:361:59 [INFO] [stdout] | [INFO] [stdout] 361 | ... ModuleError::UnknownMethod => (callback.unknown_method)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... (callback.error)(callback.ptr, module_error) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:374:55 [INFO] [stdout] | [INFO] [stdout] 374 | ... ModuleError::Destroyed => (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:378:48 [INFO] [stdout] | [INFO] [stdout] 378 | on_drop: Some(Box::new(move || (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | (callback.destroyed)(callback.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: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/lib.rs:181:12 [INFO] [stdout] | [INFO] [stdout] 181 | if let Some(v) = self.close_flag.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/lib.rs:188:9 [INFO] [stdout] | [INFO] [stdout] 188 | } [INFO] [stdout] | ^ [INFO] [stdout] = note: `--force-warn if-let-rescope` implied by `--force-warn rust-2024-compatibility` [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 181 ~ match self.close_flag.upgrade() { Some(v) => { [INFO] [stdout] 182 | let mut guard = v.write(); [INFO] [stdout] ... [INFO] [stdout] 187 | } [INFO] [stdout] 188 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/lib.rs:348:12 [INFO] [stdout] | [INFO] [stdout] 348 | if let Some(v) = runtime.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^----------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/lib.rs:382:9 [INFO] [stdout] | [INFO] [stdout] 382 | } else { [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 348 ~ match runtime.upgrade() { Some(v) => { [INFO] [stdout] 349 | let task = ModuleTask { [INFO] [stdout] ... [INFO] [stdout] 381 | v.spawn(task); [INFO] [stdout] 382 ~ } _ => { [INFO] [stdout] 383 | (callback.destroyed)(callback.ptr) [INFO] [stdout] 384 ~ }} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/lib.rs:408:12 [INFO] [stdout] | [INFO] [stdout] 408 | if let Some(f) = self.on_drop.take() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/lib.rs:410:9 [INFO] [stdout] | [INFO] [stdout] 410 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 408 ~ match self.on_drop.take() { Some(f) => { [INFO] [stdout] 409 | f() [INFO] [stdout] 410 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:50:20 [INFO] [stdout] | [INFO] [stdout] 50 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:56:17 [INFO] [stdout] | [INFO] [stdout] 56 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 50 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 51 | let slice = std::slice::from_raw_parts(data.data, data.len); [INFO] [stdout] ... [INFO] [stdout] 55 | state.waker.wake(); [INFO] [stdout] 56 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:62:20 [INFO] [stdout] | [INFO] [stdout] 62 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 62 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 63 | let err = ModuleError::Custom(CustomModuleError { [INFO] [stdout] ... [INFO] [stdout] 70 | state.waker.wake(); [INFO] [stdout] 71 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:77:20 [INFO] [stdout] | [INFO] [stdout] 77 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:80:17 [INFO] [stdout] | [INFO] [stdout] 80 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 77 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 78 | *v.write() = Some(Err(ModuleError::UnknownMethod)); [INFO] [stdout] 79 | state.waker.wake(); [INFO] [stdout] 80 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:86:20 [INFO] [stdout] | [INFO] [stdout] 86 | if let Some(v) = state.data.upgrade() { [INFO] [stdout] | ^^^^^^^^^^^^^^-------------------- [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:89:17 [INFO] [stdout] | [INFO] [stdout] 89 | } [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 86 ~ match state.data.upgrade() { Some(v) => { [INFO] [stdout] 87 | *v.write() = Some(Err(ModuleError::Destroyed)); [INFO] [stdout] 88 | state.waker.wake(); [INFO] [stdout] 89 ~ } _ => {}} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let` assigns a shorter lifetime since Edition 2024 [INFO] [stdout] --> src/module.rs:131:12 [INFO] [stdout] | [INFO] [stdout] 131 | if let Some(v) = self.data.write().take() { [INFO] [stdout] | ^^^^^^^^^^^^^^------------------------ [INFO] [stdout] | | [INFO] [stdout] | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion [INFO] [stdout] | [INFO] [stdout] = warning: this changes meaning in Rust 2024 [INFO] [stdout] = note: for more information, see issue #124085 [INFO] [stdout] help: the value is now dropped here in Edition 2024 [INFO] [stdout] --> src/module.rs:133:9 [INFO] [stdout] | [INFO] [stdout] 133 | } else { [INFO] [stdout] | ^ [INFO] [stdout] help: a `match` with a single arm can preserve the drop order up to Edition 2021 [INFO] [stdout] | [INFO] [stdout] 131 ~ match self.data.write().take() { Some(v) => { [INFO] [stdout] 132 | Poll::Ready(v.map(ModuleResponse::new)) [INFO] [stdout] 133 ~ } _ => { [INFO] [stdout] 134 | Poll::Pending [INFO] [stdout] 135 ~ }} [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 37 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 5.85s [INFO] [stderr] Running `cargo check` to verify 2024 [INFO] [stderr] Checking modular-native v0.1.1 (/tmp/fixit) [INFO] [stdout] error: unsafe attribute used without unsafe [INFO] [stdout] --> src/lib.rs:66:3 [INFO] [stdout] | [INFO] [stdout] 66 | #[no_mangle] [INFO] [stdout] | ^^^^^^^^^ usage of unsafe attribute [INFO] [stdout] | [INFO] [stdout] help: wrap the attribute in `unsafe(...)` [INFO] [stdout] | [INFO] [stdout] 66 | #[unsafe(no_mangle)] [INFO] [stdout] | +++++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unsafe attribute used without unsafe [INFO] [stdout] --> src/lib.rs:66:3 [INFO] [stdout] | [INFO] [stdout] 66 | #[no_mangle] [INFO] [stdout] | ^^^^^^^^^ usage of unsafe attribute [INFO] [stdout] | [INFO] [stdout] help: wrap the attribute in `unsafe(...)` [INFO] [stdout] | [INFO] [stdout] 66 | #[unsafe(no_mangle)] [INFO] [stdout] | +++++++ + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | unsafe extern "system" fn on_success(ptr: Obj, data: CBuf) { [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | let slice = std::slice::from_raw_parts(data.data, data.len); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:60:29 [INFO] [stdout] | [INFO] [stdout] 60 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | unsafe extern "system" fn on_unknown_method(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:84:29 [INFO] [stdout] | [INFO] [stdout] 84 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | unsafe extern "system" fn on_destroyed(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | let _ = Box::from_raw(modular); [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/lib.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | pub unsafe extern "system" fn __modular_destroy(modular: *mut NativeModular) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 197 | let Some(topic) = cstr_to_str!(subscribe.topic) else { [INFO] [stdout] | ----------------------------- in this macro invocation [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/lib.rs:192:1 [INFO] [stdout] | [INFO] [stdout] 192 | / pub unsafe extern "system" fn __modular_events_subscribe( [INFO] [stdout] 193 | | modular: &NativeModular, [INFO] [stdout] 194 | | subscribe: CSubscribe, [INFO] [stdout] 195 | | subscription: *mut CSubscriptionRef, [INFO] [stdout] 196 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | *subscription = subscription_ref; [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::drop_in_place` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | drop_in_place(subscription_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[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 246 | let topic = cstr_to_str!(topic).expect("topic must not be null"); [INFO] [stdout] | ------------------- in this macro invocation [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/lib.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | / pub unsafe extern "system" fn __modular_events_publish( [INFO] [stdout] 242 | | modular: &NativeModular, [INFO] [stdout] 243 | | topic: *const c_char, [INFO] [stdout] 244 | | buf: CBuf, [INFO] [stdout] 245 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:247:40 [INFO] [stdout] | [INFO] [stdout] 247 | let bytes = Bytes::copy_from_slice(std::slice::from_raw_parts(buf.data, buf.len)); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | let _ = Box::from_raw(subscription.0 as *mut Subscription); [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/lib.rs:252:1 [INFO] [stdout] | [INFO] [stdout] 252 | pub unsafe extern "system" fn __modular_events_unsubscribe(subscription: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 265 | let name = cstr_to_str!(name).expect("module name can't be null"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:259:1 [INFO] [stdout] | [INFO] [stdout] 259 | / pub unsafe extern "system" fn __modular_register_module( [INFO] [stdout] 260 | | modular: &NativeModular, [INFO] [stdout] 261 | | name: *const c_char, [INFO] [stdout] 262 | | module: CModule, [INFO] [stdout] 263 | | replace: bool, [INFO] [stdout] 264 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 289 | if let Some(v) = cstr_to_str!(name) { [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / pub unsafe extern "system" fn __modular_remove_module( [INFO] [stdout] 286 | | modular: &NativeModular, [INFO] [stdout] 287 | | name: *const c_char, [INFO] [stdout] 288 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 310 | let name = cstr_to_str!(name).expect("name can't be empty"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:294:1 [INFO] [stdout] | [INFO] [stdout] 294 | / pub unsafe extern "system" fn __modular_get_module_ref( [INFO] [stdout] 295 | | modular: &NativeModular, [INFO] [stdout] 296 | | name: *const c_char, [INFO] [stdout] 297 | | ) -> CModuleRef { [INFO] [stdout] | |_______________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:324:18 [INFO] [stdout] | [INFO] [stdout] 324 | let v = &*(ptr.0 as *mut RtModule); [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/lib.rs:323:5 [INFO] [stdout] | [INFO] [stdout] 323 | unsafe extern "system" fn clone(ptr: Obj) -> CModuleRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | let _ = Box::from_raw(ptr.0 as *mut RtModule); [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/lib.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 333 | unsafe extern "system" fn drop(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:343:44 [INFO] [stdout] | [INFO] [stdout] 343 | let RtModule { runtime, module } = (*(ptr.0 as *mut RtModule)).clone(); [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/lib.rs:337:5 [INFO] [stdout] | [INFO] [stdout] 337 | / unsafe extern "system" fn invoke( [INFO] [stdout] 338 | | ptr: Obj, [INFO] [stdout] 339 | | action: *const c_char, [INFO] [stdout] 340 | | data: CBuf, [INFO] [stdout] 341 | | callback: CCallback, [INFO] [stdout] 342 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:345:22 [INFO] [stdout] | [INFO] [stdout] 345 | let action = CStr::from_ptr(action).to_string_lossy().to_string(); [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:346:43 [INFO] [stdout] | [INFO] [stdout] 346 | let data = Bytes::copy_from_slice(std::slice::from_raw_parts(data.data, data.len)); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:48:29 [INFO] [stdout] | [INFO] [stdout] 48 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:47:13 [INFO] [stdout] | [INFO] [stdout] 47 | unsafe extern "system" fn on_success(ptr: Obj, data: CBuf) { [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:51:33 [INFO] [stdout] | [INFO] [stdout] 51 | let slice = std::slice::from_raw_parts(data.data, data.len); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:60:29 [INFO] [stdout] | [INFO] [stdout] 60 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:59:13 [INFO] [stdout] | [INFO] [stdout] 59 | unsafe extern "system" fn on_error(ptr: Obj, err: CModuleError) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:75:29 [INFO] [stdout] | [INFO] [stdout] 75 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:74:13 [INFO] [stdout] | [INFO] [stdout] 74 | unsafe extern "system" fn on_unknown_method(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/module.rs:84:29 [INFO] [stdout] | [INFO] [stdout] 84 | let state = Box::from_raw(ptr.0 as *mut CModuleFutureState); [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/module.rs:83:13 [INFO] [stdout] | [INFO] [stdout] 83 | unsafe extern "system" fn on_destroyed(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:358:29 [INFO] [stdout] | [INFO] [stdout] 358 | ... (callback.success)(callback.ptr, buf) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:361:59 [INFO] [stdout] | [INFO] [stdout] 361 | ... ModuleError::UnknownMethod => (callback.unknown_method)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... (callback.error)(callback.ptr, module_error) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:374:55 [INFO] [stdout] | [INFO] [stdout] 374 | ... ModuleError::Destroyed => (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:378:48 [INFO] [stdout] | [INFO] [stdout] 378 | on_drop: Some(Box::new(move || (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | (callback.destroyed)(callback.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[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:108:13 [INFO] [stdout] | [INFO] [stdout] 108 | let _ = Box::from_raw(modular); [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/lib.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | pub unsafe extern "system" fn __modular_destroy(modular: *mut NativeModular) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 197 | let Some(topic) = cstr_to_str!(subscribe.topic) else { [INFO] [stdout] | ----------------------------- in this macro invocation [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/lib.rs:192:1 [INFO] [stdout] | [INFO] [stdout] 192 | / pub unsafe extern "system" fn __modular_events_subscribe( [INFO] [stdout] 193 | | modular: &NativeModular, [INFO] [stdout] 194 | | subscribe: CSubscribe, [INFO] [stdout] 195 | | subscription: *mut CSubscriptionRef, [INFO] [stdout] 196 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:227:13 [INFO] [stdout] | [INFO] [stdout] 227 | *subscription = subscription_ref; [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::drop_in_place` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | drop_in_place(subscription_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[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 246 | let topic = cstr_to_str!(topic).expect("topic must not be null"); [INFO] [stdout] | ------------------- in this macro invocation [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/lib.rs:241:1 [INFO] [stdout] | [INFO] [stdout] 241 | / pub unsafe extern "system" fn __modular_events_publish( [INFO] [stdout] 242 | | modular: &NativeModular, [INFO] [stdout] 243 | | topic: *const c_char, [INFO] [stdout] 244 | | buf: CBuf, [INFO] [stdout] 245 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:247:40 [INFO] [stdout] | [INFO] [stdout] 247 | let bytes = Bytes::copy_from_slice(std::slice::from_raw_parts(buf.data, buf.len)); [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::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:254:17 [INFO] [stdout] | [INFO] [stdout] 254 | let _ = Box::from_raw(subscription.0 as *mut Subscription); [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/lib.rs:252:1 [INFO] [stdout] | [INFO] [stdout] 252 | pub unsafe extern "system" fn __modular_events_unsubscribe(subscription: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 265 | let name = cstr_to_str!(name).expect("module name can't be null"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:259:1 [INFO] [stdout] | [INFO] [stdout] 259 | / pub unsafe extern "system" fn __modular_register_module( [INFO] [stdout] 260 | | modular: &NativeModular, [INFO] [stdout] 261 | | name: *const c_char, [INFO] [stdout] 262 | | module: CModule, [INFO] [stdout] 263 | | replace: bool, [INFO] [stdout] 264 | | ) -> i32 { [INFO] [stdout] | |________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 289 | if let Some(v) = cstr_to_str!(name) { [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:285:1 [INFO] [stdout] | [INFO] [stdout] 285 | / pub unsafe extern "system" fn __modular_remove_module( [INFO] [stdout] 286 | | modular: &NativeModular, [INFO] [stdout] 287 | | name: *const c_char, [INFO] [stdout] 288 | | ) { [INFO] [stdout] | |_^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | Some(CStr::from_ptr($arg).to_string_lossy()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ call to unsafe function [INFO] [stdout] ... [INFO] [stdout] 310 | let name = cstr_to_str!(name).expect("name can't be empty"); [INFO] [stdout] | ------------------ in this macro invocation [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/lib.rs:294:1 [INFO] [stdout] | [INFO] [stdout] 294 | / pub unsafe extern "system" fn __modular_get_module_ref( [INFO] [stdout] 295 | | modular: &NativeModular, [INFO] [stdout] 296 | | name: *const c_char, [INFO] [stdout] 297 | | ) -> CModuleRef { [INFO] [stdout] | |_______________^ [INFO] [stdout] = note: this warning originates in the macro `cstr_to_str` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:324:18 [INFO] [stdout] | [INFO] [stdout] 324 | let v = &*(ptr.0 as *mut RtModule); [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/lib.rs:323:5 [INFO] [stdout] | [INFO] [stdout] 323 | unsafe extern "system" fn clone(ptr: Obj) -> CModuleRef { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::boxed::Box::::from_raw` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:334:17 [INFO] [stdout] | [INFO] [stdout] 334 | let _ = Box::from_raw(ptr.0 as *mut RtModule); [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/lib.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 333 | unsafe extern "system" fn drop(ptr: Obj) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: dereference of raw pointer is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:343:44 [INFO] [stdout] | [INFO] [stdout] 343 | let RtModule { runtime, module } = (*(ptr.0 as *mut RtModule)).clone(); [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/lib.rs:337:5 [INFO] [stdout] | [INFO] [stdout] 337 | / unsafe extern "system" fn invoke( [INFO] [stdout] 338 | | ptr: Obj, [INFO] [stdout] 339 | | action: *const c_char, [INFO] [stdout] 340 | | data: CBuf, [INFO] [stdout] 341 | | callback: CCallback, [INFO] [stdout] 342 | | ) { [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning[E0133]: call to unsafe function `std::ffi::CStr::from_ptr` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:345:22 [INFO] [stdout] | [INFO] [stdout] 345 | let action = CStr::from_ptr(action).to_string_lossy().to_string(); [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::slice::from_raw_parts` is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:346:43 [INFO] [stdout] | [INFO] [stdout] 346 | let data = Bytes::copy_from_slice(std::slice::from_raw_parts(data.data, data.len)); [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:358:29 [INFO] [stdout] | [INFO] [stdout] 358 | ... (callback.success)(callback.ptr, buf) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:361:59 [INFO] [stdout] | [INFO] [stdout] 361 | ... ModuleError::UnknownMethod => (callback.unknown_method)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:372:33 [INFO] [stdout] | [INFO] [stdout] 372 | ... (callback.error)(callback.ptr, module_error) [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 is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:374:55 [INFO] [stdout] | [INFO] [stdout] 374 | ... ModuleError::Destroyed => (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:378:48 [INFO] [stdout] | [INFO] [stdout] 378 | on_drop: Some(Box::new(move || (callback.destroyed)(callback.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[E0133]: call to unsafe function is unsafe and requires unsafe block [INFO] [stdout] --> src/lib.rs:383:13 [INFO] [stdout] | [INFO] [stdout] 383 | (callback.destroyed)(callback.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; 26 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0133`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error; 26 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 `modular-native` (lib) due to 2 previous errors; 26 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `modular-native` (lib test) due to 2 previous errors; 26 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" "e2668a29271d70913993772999bf5d08ece2b6faab01ca610ab1556dae443942", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "e2668a29271d70913993772999bf5d08ece2b6faab01ca610ab1556dae443942", kill_on_drop: false }` [INFO] [stdout] e2668a29271d70913993772999bf5d08ece2b6faab01ca610ab1556dae443942