The godot_warn, godot_error, and godot_script_error macros contain a semicolon at the end of their bodies which will become a hard error in a future release of Rust when using the macros as an expression:
warning: trailing semicolon in macro used in expression position
--> /Users/centdemeern1/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/godot-core-0.5.4/src/global/print.rs:336:86
|
334 | macro_rules! godot_error {
| ------------------------ in this expansion of `godot_error!`
335 | ($fmt:literal $(, $args:expr_2021)* $(,)?) => {
336 | $crate::inner_godot_msg!($crate::global::PrintLevel::Error; $fmt $(, $args)*);
| ^
|
::: src/pathfinding/datatypes/gridmap.rs:18:30
|
18 | .inspect_err(|e| godot_error!("Invalid type: got {e}"))
| ------------------------------------- in this macro invocation
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #79813 <https://github.com/rust-lang/rust/issues/79813>
= note: `#[warn(semicolon_in_expressions_from_non_local_macros)]` (part of `#[warn(future_incompatible)]`) on by default
Repro:
The
godot_warn,godot_error, andgodot_script_errormacros contain a semicolon at the end of their bodies which will become a hard error in a future release of Rust when using the macros as an expression:Repro: