From 4644b2f5051c8366cbae2c5596b6298a03b0eec7 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 16 Jul 2026 09:55:25 +0200 Subject: [PATCH 1/2] Allow semicolon_in_expressions_from_macros lint in build scripts using 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 (https://github.com/katharostech/cfg_aliases/pull/15) is merged and released. --- examples/gstreamer-player/build.rs | 5 +++++ internal/backends/linuxkms/build.rs | 5 +++++ internal/backends/selector/build.rs | 5 +++++ internal/backends/testing/build.rs | 5 +++++ internal/backends/winit/build.rs | 5 +++++ internal/renderers/skia/build.rs | 5 +++++ 6 files changed, 30 insertions(+) diff --git a/examples/gstreamer-player/build.rs b/examples/gstreamer-player/build.rs index 75fbf2971a3..fcef775481e 100644 --- a/examples/gstreamer-player/build.rs +++ b/examples/gstreamer-player/build.rs @@ -1,6 +1,11 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: MIT +// The expansion of cfg_aliases! places macro-emitted semicolons in expression +// position, which nightly rejects by default since 2026-07. Allow it until a +// fixed cfg-aliases release is available. +#![allow(semicolon_in_expressions_from_macros)] + use cfg_aliases::cfg_aliases; fn main() { diff --git a/internal/backends/linuxkms/build.rs b/internal/backends/linuxkms/build.rs index c937bb7a6a6..3f55780ca8d 100644 --- a/internal/backends/linuxkms/build.rs +++ b/internal/backends/linuxkms/build.rs @@ -1,6 +1,11 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 +// The expansion of cfg_aliases! places macro-emitted semicolons in expression +// position, which nightly rejects by default since 2026-07. Allow it until a +// fixed cfg-aliases release is available. +#![allow(semicolon_in_expressions_from_macros)] + use cfg_aliases::cfg_aliases; fn main() { diff --git a/internal/backends/selector/build.rs b/internal/backends/selector/build.rs index 1694519589b..709be57be3e 100644 --- a/internal/backends/selector/build.rs +++ b/internal/backends/selector/build.rs @@ -1,6 +1,11 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 +// The expansion of cfg_aliases! places macro-emitted semicolons in expression +// position, which nightly rejects by default since 2026-07. Allow it until a +// fixed cfg-aliases release is available. +#![allow(semicolon_in_expressions_from_macros)] + // cSpell: ignore qttype use std::path::Path; diff --git a/internal/backends/testing/build.rs b/internal/backends/testing/build.rs index eeeed860c7f..13aef0d7d99 100644 --- a/internal/backends/testing/build.rs +++ b/internal/backends/testing/build.rs @@ -1,6 +1,11 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 +// The expansion of cfg_aliases! places macro-emitted semicolons in expression +// position, which nightly rejects by default since 2026-07. Allow it until a +// fixed cfg-aliases release is available. +#![allow(semicolon_in_expressions_from_macros)] + // cSpell: ignore rsplit Sfixed fn main() { cfg_aliases::cfg_aliases! { diff --git a/internal/backends/winit/build.rs b/internal/backends/winit/build.rs index f5ee58b0465..aee66ada5a0 100644 --- a/internal/backends/winit/build.rs +++ b/internal/backends/winit/build.rs @@ -1,6 +1,11 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 +// The expansion of cfg_aliases! places macro-emitted semicolons in expression +// position, which nightly rejects by default since 2026-07. Allow it until a +// fixed cfg-aliases release is available. +#![allow(semicolon_in_expressions_from_macros)] + use cfg_aliases::cfg_aliases; fn main() { diff --git a/internal/renderers/skia/build.rs b/internal/renderers/skia/build.rs index e5c66df8d4e..ec5161c65d4 100644 --- a/internal/renderers/skia/build.rs +++ b/internal/renderers/skia/build.rs @@ -1,6 +1,11 @@ // Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 +// The expansion of cfg_aliases! places macro-emitted semicolons in expression +// position, which nightly rejects by default since 2026-07. Allow it until a +// fixed cfg-aliases release is available. +#![allow(semicolon_in_expressions_from_macros)] + use cfg_aliases::cfg_aliases; fn main() { From 739449bd59ca52ffba4a3025c779ecee1e197fde Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 16 Jul 2026 10:23:51 +0200 Subject: [PATCH 2/2] Fix trailing semicolon in the expansion of for_each_enums and for_each_builtin_structs Rust nightly from 2026-07-16 on rejects macro expansions that leave a trailing semicolon in expression position (deny-by-default semicolon_in_expressions_from_macros lint). for_each_enums! is used in expression position in the interpreter's dynamic_item_tree.rs, which broke the rust-cpp-docs CI job. Expand to a brace-delimited invocation without a trailing semicolon, which is valid in both item and expression position, like for_each_keys already does. for_each_builtin_structs had the same latent pattern, so fix it as well even though all its current callers are in item or statement position. --- internal/common/builtin_structs.rs | 4 ++-- internal/common/enums.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/common/builtin_structs.rs b/internal/common/builtin_structs.rs index e19b5b6c45d..fead7d3cfa3 100644 --- a/internal/common/builtin_structs.rs +++ b/internal/common/builtin_structs.rs @@ -26,7 +26,7 @@ #[macro_export] macro_rules! for_each_builtin_structs { ($macro:ident) => { - $macro![ + $macro! { /// The `KeyboardModifiers` struct provides booleans to indicate possible modifier keys on a keyboard, such as Shift, Control, etc. /// It is provided as part of `KeyEvent`'s `modifiers` field. /// @@ -173,6 +173,6 @@ macro_rules! for_each_builtin_structs { /// The bottom edge value bottom: Coord, } - ]; + } }; } diff --git a/internal/common/enums.rs b/internal/common/enums.rs index bd94a52951b..da6aad44acf 100644 --- a/internal/common/enums.rs +++ b/internal/common/enums.rs @@ -23,7 +23,7 @@ #[macro_export] macro_rules! for_each_enums { ($macro:ident) => { - $macro![ + $macro! { /// This enum describes the different types of alignment of text along the horizontal axis of a `Text` or `StyledText` element. #[non_exhaustive] enum TextHorizontalAlignment { @@ -684,6 +684,6 @@ macro_rules! for_each_enums { /// This variant is reported when the operating system is none of the above. Other, } - ]; + } }; }