Warn about unused expressions with closure or generator type. This follows
existing precedence of must use annotations present on `FnOnce`, `FnMut`, `Fn`
traits, which already indirectly apply to closures in some cases, e.g.,:
```rust
fn f() -> impl FnOnce() {
|| {}
}
fn main() {
// an existing warning: unused implementer of `std::ops::FnOnce` that must be used:
f();
// a new warning: unused closure that must be used:
|| {};
}
```
|
||
|---|---|---|
| .. | ||
| auxiliary | ||
| decl-macro-test.rs | ||
| inaccessible-test-modules.rs | ||
| inaccessible-test-modules.stderr | ||
| run-unexported-tests.rs | ||
| test-allow-fail-attr.rs | ||
| test-attr-non-associated-functions.rs | ||
| test-attr-non-associated-functions.stderr | ||
| test-cant-be-shadowed.rs | ||
| test-fn-signature-verification-for-explicit-return-type.rs | ||
| test-main-not-dead-attr.rs | ||
| test-main-not-dead.rs | ||
| test-on-macro.rs | ||
| test-on-macro.stderr | ||
| test-runner-hides-buried-main.rs | ||
| test-runner-hides-main.rs | ||
| test-runner-hides-start.rs | ||
| test-should-fail-good-message.rs | ||
| test-should-panic-attr.rs | ||
| test-should-panic-attr.stderr | ||
| test-vs-cfg-test.rs | ||
| test-warns-dead-code.rs | ||
| test-warns-dead-code.stderr | ||