Re: [PATCH] rust: ptr: replace unneeded use of `build_assert`

From: Miguel Ojeda

Date: Sat Jan 17 2026 - 14:16:28 EST


On Sat, Jan 17, 2026 at 5:49 PM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> static_assert! creates an item and thus cannot refer to generic parameters.

Ah, right, thanks Gary -- you were the one removing that limitation
from const blocks years ago!

Since we are here, I wondered about whether there was progress on
allowing top-level inline const so that we could perhaps use that for
a macro that can do both (or just use the inline const syntax
everywhere, but `rustfmt` may employ three lines...), i.e. this one I
had linked in our usual list:

https://github.com/rust-lang/lang-team/issues/251

But I see someone recently created a tracking issue and even an
implementation PR (without commenting in the above issue, which makes
it hard to notice). It actually seems close to landing:

https://github.com/rust-lang/rust/issues/149226
https://github.com/rust-lang/rust/pull/149174

There is/was an early experiment on omitting `: ()` on const items as well:

https://github.com/rust-lang/rust/pull/149738

Cheers,
Miguel