Re: [PATCH v1] rust: bug: prevent dead_code warning from warn_on!'s flags constant

Miguel Ojeda <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux
Message-ID <CANiq72ny0qhkMp722t9kTbX444s61NLNfZktwatNPXEhLcSYow@mail.gmail.com>
On Sun, Aug 9, 2026 at 2:34 AM FUJITA Tomonori <[email protected]> wrote:
>
> Since it marks the expressions as used without evaluating them, how
> about `mark_used!`?

Yeah, that sounds good, thanks!

[ I am not sure about the "without evaluating them". While the Rust
reference talks about "evaluation" in the `if` expressions page, a
`const` block there may or may not still get evaluated anyway.

  In practice, I can see e.g. the build being stopped with a const
assert at least in some cases. ]

Cheers,
Miguel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.