Skip to content

Fix trailing semicolon in expression macro bodies#15

Merged
zicklag merged 1 commit into
katharostech:masterfrom
nazar-pc:fix-trailing-semicolon
Jul 16, 2026
Merged

Fix trailing semicolon in expression macro bodies#15
zicklag merged 1 commit into
katharostech:masterfrom
nazar-pc:fix-trailing-semicolon

Conversation

@nazar-pc

Copy link
Copy Markdown
Contributor

This is a trivial change, which addresses rust-lang/rust#79813.

It is going to become a hard error soon: rust-lang/rust#159218.

The only reason is wasn't caught earlier is due to rust-lang/rust#159222, which is how I noticed it after Nightly upgrade.

I'd really appreciate a patch release some time soon.

@nazar-pc

Copy link
Copy Markdown
Contributor Author

There doesn't seem to be automated CI testing in this repo, but I ran tests, clippy and checked that wgpu (which uses this crate) all work fine with these changes.

YuanYuYuan added a commit to ZettaScaleLabs/zenoh that referenced this pull request Jul 16, 2026
The hand-rolled build.rs rewrite worked but reimplemented ~40 lines
of macro logic by hand. Revert to the cfg_aliases! macro and instead
patch the crate to the (as yet unreleased) upstream fix commit --
katharostech/cfg_aliases#15 removes the trailing semicolons that trip
rustc's semicolon_in_expressions_from_macros lint. Drop the patch once
a real 0.2.2+ release ships.
tronical added a commit to slint-ui/slint that referenced this pull request Jul 16, 2026
…g cfg_aliases

Rust nightly from 2026-07-16 on turns this lint into a deny-by-default
error, and the expansion of the cfg_aliases! macro trips it. This broke
the rust-cpp-docs and cpp_cmake nightly CI jobs when compiling the
i-slint-renderer-skia build script; the other build scripts using
cfg_aliases would fail the same way once reached.

Allow the lint in the affected build scripts until the upstream fix
(katharostech/cfg_aliases#15) is merged and
released.
@zicklag

zicklag commented Jul 16, 2026

Copy link
Copy Markdown
Member

Looks great, thanks!

@zicklag
zicklag merged commit e069ce6 into katharostech:master Jul 16, 2026
@nazar-pc
nazar-pc deleted the fix-trailing-semicolon branch July 16, 2026 14:55
ifdario added a commit to rayfish/net-tools that referenced this pull request Jul 16, 2026
New nightly cargo lints fire inside the cfg_aliases macro; allow it until
katharostech/cfg_aliases#15 lands, same as
n0-computer/noq#748.
tronical added a commit to slint-ui/slint that referenced this pull request Jul 16, 2026
cfg_aliases 0.2.2 fixes the macro expansion that placed semicolons in
expression position (katharostech/cfg_aliases#15),
which nightly rejects via the semicolon_in_expressions_from_macros lint
since 2026-07-16.

Bump the minimum version to 0.2.2 and revert the
allow(semicolon_in_expressions_from_macros) workaround from commit
b7a7676 in the affected build scripts.
tronical added a commit to slint-ui/slint that referenced this pull request Jul 16, 2026
cfg_aliases 0.2.2 fixes the macro expansion that placed semicolons in
expression position (katharostech/cfg_aliases#15),
which nightly rejects via the semicolon_in_expressions_from_macros lint
since 2026-07-16.

Bump the minimum version to 0.2.2 and revert the
allow(semicolon_in_expressions_from_macros) workaround from commit
b7a7676 in the affected build scripts.
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