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 | <CANiq72nWcqd3aSKdPqOSRRQBuwWNW-s2EOscYszQ9kSbmrKxcw@mail.gmail.com> |
On Fri, Jul 24, 2026 at 1:40 AM Gary Guo <[email protected]> wrote: > > Also, the proper fix would be to mark it as used in the `warn_flags` macro > that discard the expression. > > if false { > _ = $flags; > } Maybe it could be nice to have a `discard!` macro later on. Cheers, Miguel