]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: remove feature function-macro
authorJason Ish <jason.ish@oisf.net>
Fri, 17 Dec 2021 22:25:47 +0000 (16:25 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 11 Jan 2022 06:38:58 +0000 (07:38 +0100)
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.

configure.ac
rust/Cargo.toml.in
rust/src/log.rs

index ce025798e4735bae1ec60e1ea6719d4b38e1c0fd..46a4982726a314b864bffc6eaf9fc7883dcf6979 100644 (file)
@@ -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"
index 3f484c339ea8c51f5704fb866d2d80f3ef8d4cb8..6febd4c532722258153e5be6ed916a9cf958826d 100644 (file)
@@ -20,7 +20,6 @@ lua_int8 = ["lua"]
 strict = []
 debug = []
 debug-validate = []
-function-macro = []
 
 [dependencies]
 nom = "~5.1.2"
index b61c6cddaf2adcbd9ec1e206bfd9c32c2ded9c0d..83c1dc357b2e25786a461e128c680d6f3843341a 100644 (file)
@@ -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 {
-    () => {{ "<rust>" }}
-}
-
 #[macro_export]
 macro_rules!do_log {
     ($level:expr, $code:expr, $($arg:tt)*) => {