Skip to content

Commit

Permalink
Fix invalid macro_export usage
Browse files Browse the repository at this point in the history
This fixes build failure with Rust 1.69+. According to [^1], "the only
valid argument is `#[macro_export(local_inner_macros)]` or no argument
(`#[macro_export]`)".

The check for invalid `#[macro_export]` arguments was added in
rust-lang/rust#107911 and first released in Rust 1.69.0.

[^1]: https://github.com/rust-lang/rust/blob/1.69.0/compiler/rustc_lint_defs/src/builtin.rs#L4129

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
  • Loading branch information
ZhongRuoyu committed May 1, 2023
1 parent 8cca5dc commit 098b777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ pub async fn load_troy_file(world: &World, file_name: &str) -> Result<usize> {
}

/// Logs but ignores an error
#[macro_export(log_error)]
#[macro_export]
#[doc(hidden)]
macro_rules! log_error {
($maybe_error:expr, $($args:tt)+) => (
Expand Down

0 comments on commit 098b777

Please sign in to comment.