-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
unsafe(plugin_interface! {
extern trait ExamplePlugin {
/// Ask the plugin to do a thing
fn do_a_thing();
/// Say hello to a person
fn say_hello(to: *const c_char) -> bool;
/// Here's a function
fn trigger_function(a_func: extern "C" fn(u32, u32));
}
})
Current output
Compiling sxarc_host v0.7.0 (C:\DEV\sxarc\exec\sxarc_host)
error: expected item, found keyword `unsafe`
--> exec\sxarc_host\src\lib.rs:4:1
|
4 | unsafe(plugin_interface! {
| ^^^^^^ expected item
|
= note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
error: could not compile `sxarc_host` (lib) due to 1 previous error
Desired output
edition = "2021" it is compiling
edition = "2024" is throwing the above error
Rationale and extra context
Original Code is from : https://github.com/lilopkins/dynamic-plugins-rs/tree/main
Was changing the project structure and actualizing all crate versions to the latest one.
Other cases
Rust Version
rustc 1.88.0 (6b00bc388 2025-06-23)
binary: rustc
commit-hash: 6b00bc3880198600130e1cf62b8f8a93494488cc
commit-date: 2025-06-23
host: x86_64-pc-windows-msvc
release: 1.88.0
LLVM version: 20.1.5
Anything else?
Was only changing the Project Structure to (see picture) and updating all cartes / Versions to the newest one.

Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsS-needs-reproStatus: This issue has no reproduction and needs a reproduction to make progress.Status: This issue has no reproduction and needs a reproduction to make progress.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.