rust/src/test/ui/unused
Tomasz Miąsko 821d50aa0c Make closures and generators a must use types
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:
    || {};
}
```
2020-07-28 00:00:00 +00:00
..
unused-attr.rs Introduce #[rustc_dummy] attribute and use it in tests 2019-06-08 23:55:25 +03:00
unused-attr.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
unused-closure.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unused-closure.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unused-macro-rules.rs
unused-macro-rules.stderr rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros. 2020-02-06 21:46:38 +02:00
unused-macro-with-bad-frag-spec.rs
unused-macro-with-bad-frag-spec.stderr Update tests 2019-03-11 23:10:26 +03:00
unused-macro-with-follow-violation.rs
unused-macro-with-follow-violation.stderr Update tests 2019-03-11 23:10:26 +03:00
unused-macro.rs
unused-macro.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00
unused-mut-warning-captured-var.fixed Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unused-mut-warning-captured-var.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
unused-mut-warning-captured-var.stderr Audit uses of span_suggestion_short 2020-07-02 15:18:33 +09:00
unused-result.rs Normalise notes with the/is 2020-01-24 16:24:50 +00:00
unused-result.stderr Normalise notes with the/is 2020-01-24 16:24:50 +00:00