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.
pull/6764/head
Jason Ish 3 years ago committed by Victor Julien
parent 613b12b0e7
commit 2ffe88c1f0

@ -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"

@ -20,7 +20,6 @@ lua_int8 = ["lua"]
strict = []
debug = []
debug-validate = []
function-macro = []
[dependencies]
nom = "~5.1.2"

@ -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)*) => {

Loading…
Cancel
Save