Putting #[must_use] on a trait is currently a no-op (it doesn't seem to do anything, but it is allowed). See example on playground.
One important use-case for this would be to have #[must_use] on std::Future. When returning impl Future<…> or Box<dyn Future<…>> from a function, it should lead to a warning if that future is not used, as that is almost certainly a bug.
Putting
#[must_use]on a trait is currently a no-op (it doesn't seem to do anything, but it is allowed). See example on playground.One important use-case for this would be to have
#[must_use]onstd::Future. When returningimpl Future<…>orBox<dyn Future<…>>from a function, it should lead to a warning if that future is not used, as that is almost certainly a bug.