You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of rust-lang#55663 - varkor:must_use-traits, r=estebank
Allow #[must_use] on traits
Addresses rust-lang#55506, but we'll probably want to add it to some library traits like `Iterator` before the issue is considered fixed. Fixesrust-lang#51560.
`#[must_use]` is already permitted on traits, with no effect, so this seems like a bug fix, but I might be overlooking something. This currently warns for `impl Trait` or `dyn Trait` when the `Trait` is `#[must_use]` (although I don't think the latter is currently possible, so it's simply future-proofed).
0 commit comments