SIGN IN SIGN UP
rust-lang / rust UNCLAIMED

Empowering everyone to build reliable and efficient software.

0 0 59 Rust

Auto merge of #111684 - ChayimFriedman2:unused-offset-of, r=WaffleLapkin

Warn on unused `offset_of!()` result

The usage of `core::hint::must_use()` means that we don't get a specialized message. I figured out that since there are plenty of other methods that just have `#[must_use]` with no message it'll be fine, but it is a bit unfortunate that the error mentions `must_use` and not `offset_of!`.

Fixes #111669.
B
bors committed
006a26c0b546abc0fbef59a773639582b641e500