Skip to content

Remove semicolon from macro bodies to fix lint warning - #1

Merged
lsunsi merged 1 commit into
lsunsi:mainfrom
philss:ps-remove-semicolon-rust-v1.99-warn
Oct 8, 2026
Merged

lsunsi merged 1 commit into
lsunsi:mainfrom
philss:ps-remove-semicolon-rust-v1.99-warn

Conversation

@philss

@philss philss commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

This is related to rust-lang/rust#79813 and in the future is going to be an error.

Example of a warning
warning: trailing semicolon in macro used in expression position
   --> src/routes.rs:198:30
    |
198 |               active.then_some(i!(
    |  ______________________________^
199 | |                 class = "ph-duotone ph-bird text-yellow-500 absolute right-full"
200 | |             )),
    | |_____________^
    |
    = note: macro invocations at the end of a block are treated as expressions
    = note: to ignore the value produced by the macro, add a semicolon after the invocation of `element`
    = 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: this warning originates in the macro `$crate::element` which comes from the expansion of the macro `i` (in Nightly builds, run with -Z macro-backtrace for more info)

This is related to rust-lang/rust#79813
and in the future is going to be an error.

@lsunsi lsunsi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@lsunsi
lsunsi merged commit d590674 into lsunsi:main Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants