Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): fix non_local_definitions warning in Rust 1.83 #25

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions falco_plugin/src/plugin/base/wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ macro_rules! wrap_ffi {
#[macro_export]
macro_rules! plugin {
(unsafe { $maj:expr; $min:expr; $patch:expr } => #[no_capabilities] $ty:ty) => {
unsafe impl $crate::internals::base::wrappers::BasePluginExported for $ty {}

$crate::base_plugin_ffi_wrappers!($maj; $min; $patch => #[no_mangle] $ty);
};
(unsafe { $maj:expr; $min:expr; $patch:expr } => $ty:ty) => {
Expand Down Expand Up @@ -449,6 +451,7 @@ macro_rules! static_plugin {
};

// a static plugin automatically exports all capabilities
unsafe impl $crate::internals::base::wrappers::BasePluginExported for $ty {}
unsafe impl $crate::internals::async_event::wrappers::AsyncPluginExported for $ty {}
unsafe impl $crate::internals::extract::wrappers::ExtractPluginExported for $ty {}
unsafe impl $crate::internals::listen::wrappers::CaptureListenPluginExported for $ty {}
Expand Down Expand Up @@ -496,8 +499,6 @@ macro_rules! ensure_plugin_capabilities {
#[macro_export]
macro_rules! base_plugin_ffi_wrappers {
($maj:expr; $min:expr; $patch:expr => #[$attr:meta] $ty:ty) => {
unsafe impl $crate::internals::base::wrappers::BasePluginExported for $ty {}

#[$attr]
pub extern "C-unwind" fn plugin_get_required_api_version() -> *const std::ffi::c_char {
$crate::internals::base::wrappers::plugin_get_required_api_version::<
Expand Down
Loading