Skip to content

Do not trigger the semicolon_in_expressions_from_macros lint - #560

Merged
shepmaster merged 1 commit into
mainfrom
whatever-semicolon-expression
Jul 21, 2026
Merged

Do not trigger the semicolon_in_expressions_from_macros lint#560
shepmaster merged 1 commit into
mainfrom
whatever-semicolon-expression

Conversation

@shepmaster

Copy link
Copy Markdown
Owner

rust-lang/rust#79813

We cannot usefully write a test for this as the lint has historically not been applied to macros from other crates. We only test the whatever macro through doctests and integration tests, which count as "other crates" for our purposes. It appears that only recently has the lint been expanded to go across crates, but it's already deny-by-default.

In lieu of a test, we can reproduce the error by running cargo test with a specific nightly. I used cargo 1.99.0-nightly (3efb1f477 2026-07-17).

@shepmaster shepmaster added the maintenance Keeping the wheels turning label Jul 21, 2026
@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for shepmaster-snafu ready!

Name Link
🔨 Latest commit 86c5365
🔍 Latest deploy log https://app.netlify.com/projects/shepmaster-snafu/deploys/6a5fb00ccae8fa000878e68f
😎 Deploy Preview https://deploy-preview-560--shepmaster-snafu.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@shepmaster shepmaster linked an issue Jul 21, 2026 that may be closed by this pull request
rust-lang/rust#79813

We cannot usefully write a test for this as the lint has historically
not been applied to macros from other crates. We only test the
`whatever` macro through doctests and integration tests, which count
as "other crates" for our purposes. It appears that only recently has
the lint been expanded to go across crates, but it's already
deny-by-default.

In lieu of a test, we can reproduce the error by running `cargo test`
with a specific nightly. I used `cargo 1.99.0-nightly (3efb1f477
2026-07-17)`.
@shepmaster
shepmaster force-pushed the whatever-semicolon-expression branch from 451fa6a to 86c5365 Compare July 21, 2026 17:44
@shepmaster
shepmaster merged commit db84e7e into main Jul 21, 2026
20 checks passed
@shepmaster
shepmaster deleted the whatever-semicolon-expression branch July 21, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Keeping the wheels turning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trailing semicolon in macro used in expression position

1 participant