From: Jason Ish Date: Fri, 17 Dec 2021 22:25:47 +0000 (-0600) Subject: rust: remove feature function-macro X-Git-Tag: suricata-7.0.0-beta1~1081 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ffe88c1f076977253409d5732617aec02ece016;p=thirdparty%2Fsuricata.git rust: remove feature function-macro The function macro existed so it would only be enabled on Rust versions that supported. Now that our MSRV is 1.41, which is greater than 1.38 we can assume we always have support for this macro. --- diff --git a/configure.ac b/configure.ac index ce025798e4..46a4982726 100644 --- a/configure.ac +++ b/configure.ac @@ -2246,10 +2246,6 @@ fi AC_MSG_RESULT(yes) RUST_FEATURES="" - AS_VERSION_COMPARE([$rustc_version], [1.38.0], - [], - [RUST_FEATURES="$RUST_FEATURES function-macro"], - [RUST_FEATURES="$RUST_FEATURES function-macro"]) rust_vendor_comment="# " have_rust_vendor="no" diff --git a/rust/Cargo.toml.in b/rust/Cargo.toml.in index 3f484c339e..6febd4c532 100644 --- a/rust/Cargo.toml.in +++ b/rust/Cargo.toml.in @@ -20,7 +20,6 @@ lua_int8 = ["lua"] strict = [] debug = [] debug-validate = [] -function-macro = [] [dependencies] nom = "~5.1.2" diff --git a/rust/src/log.rs b/rust/src/log.rs index b61c6cddaf..83c1dc357b 100644 --- a/rust/src/log.rs +++ b/rust/src/log.rs @@ -84,7 +84,6 @@ pub fn sclog(level: Level, file: &str, line: u32, function: &str, // This macro has been borrowed from https://github.com/popzxc/stdext-rs, which // is released under the MIT license as there is currently no macro in Rust // to provide the function name. -#[cfg(feature = "function-macro")] #[macro_export(local_inner_macros)] macro_rules!function { () => {{ @@ -98,14 +97,6 @@ macro_rules!function { }} } -// Rust versions less than 1.38 can not use the above macro, so keep the old -// macro around for a while. -#[cfg(not(feature = "function-macro"))] -#[macro_export(local_inner_macros)] -macro_rules!function { - () => {{ "" }} -} - #[macro_export] macro_rules!do_log { ($level:expr, $code:expr, $($arg:tt)*) => {