Add the unsafe attribute to no_mangle in plugin method generation

This commit is contained in:
vyPal 2025-03-11 11:01:32 +01:00
parent eb27cfa16a
commit 54b1bf1759

View File

@ -62,7 +62,7 @@ pub fn plugin_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
#(#methods)* #(#methods)*
} }
#[no_mangle] #[unsafe(no_mangle)]
pub fn plugin() -> Box<dyn pumpkin::plugin::Plugin> { pub fn plugin() -> Box<dyn pumpkin::plugin::Plugin> {
Box::new(#struct_ident::new()) Box::new(#struct_ident::new())
} }