External Publication
Visit Post

Idea: #[must_use = inherit]

Rust Internals [Unofficial] April 3, 2026
Source

It does work, but still has two downsides:

  • Verbose. I should put #[expect(clippy::double_must_use)] on every function that returns a Result<T, E>(for example). In addition, if you turned on allow_attributes_without_reason(I did!), now it becomes #[expect(clippy::double_must_use, reason = "...")]. That will be nightmare IMO.
  • Doubled warning, what double_must_use is concerned about.

Discussion in the ATmosphere

Loading comments...