rust/src/test/ui/generator
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
..
auxiliary
addassign-yield.rs
async-generator-issue-67158.rs
async-generator-issue-67158.stderr
auto-trait-regions.nll.stderr
auto-trait-regions.rs
auto-trait-regions.stderr
borrow-in-tail-expr.rs
borrowing.rs
borrowing.stderr
conditional-drop.rs
control-flow.rs
discriminant.rs improve DiscriminantKind handling 2020-07-15 10:20:44 +02:00
drop-and-replace.rs
drop-env.rs
dropck-resume.rs
dropck-resume.stderr
dropck.rs
dropck.stderr
generator-region-requirements.migrate.stderr
generator-region-requirements.rs
generator-region-requirements.stderr
generator-resume-after-panic.rs
generator-with-nll.rs
generator-with-nll.stderr
generator-yielding-or-returning-itself.rs
generator-yielding-or-returning-itself.stderr
issue-44197.rs
issue-48048.rs
issue-48048.stderr
issue-52398.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
issue-52398.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
issue-53548-1.rs
issue-53548.rs
issue-57084.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
issue-57084.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
issue-58888.rs
issue-61442-stmt-expr-with-drop.rs
issue-62506-two_awaits.rs
issue-64620-yield-array-element.rs
issue-64620-yield-array-element.stderr
issue-68112.rs
issue-68112.stderr
issue-69017.rs
issue-69039.rs
iterator-count.rs
live-upvar-across-yield.rs
match-bindings.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
match-bindings.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
nested_generators.rs
niche-in-generator.rs
non-static-is-unpin.rs
not-send-sync.rs
not-send-sync.stderr
overlap-locals.rs
panic-drops-resume.rs
panic-drops.rs
panic-safe.rs
partial-initialization-across-yield.rs
partial-initialization-across-yield.stderr
pattern-borrow.rs
pattern-borrow.stderr
pin-box-generator.rs
reborrow-mut-upvar.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
reborrow-mut-upvar.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
ref-escapes-but-not-over-yield.rs
ref-escapes-but-not-over-yield.stderr
resume-after-return.rs
resume-arg-late-bound.nll.stderr fix subtle bug in NLL type checker 2020-06-22 18:51:08 +00:00
resume-arg-late-bound.rs move leak-check to during coherence, candidate eval 2020-06-22 15:33:05 +00:00
resume-arg-late-bound.stderr move leak-check to during coherence, candidate eval 2020-06-22 15:33:05 +00:00
resume-arg-size.rs Fix incorrect comment in generator test 2020-05-27 21:38:38 +02:00
resume-live-across-yield.rs
retain-resume-ref.rs
retain-resume-ref.stderr
size-moved-locals.rs Revert #71956 2020-06-08 14:58:37 -07:00
sized-yield.rs
sized-yield.stderr Remove Sized on_unimplemented note 2020-07-14 10:50:24 -07:00
smoke-resume-args.rs
smoke.rs
static-generators.rs
static-mut-reference-across-yield.rs
static-not-unpin.rs
static-not-unpin.stderr
static-reference-across-yield.rs
too-live-local-in-immovable-gen.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
too-live-local-in-immovable-gen.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
too-many-parameters.rs
too-many-parameters.stderr
type-mismatch-error.rs
type-mismatch-error.stderr
type-mismatch-signature-deduction.rs
type-mismatch-signature-deduction.stderr
xcrate-reachable.rs
xcrate.rs
yield-in-args-rev.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-in-args-rev.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-in-args.rs
yield-in-args.stderr
yield-in-box.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-in-box.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-in-const.rs
yield-in-const.stderr
yield-in-function.rs
yield-in-function.stderr
yield-in-initializer.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-in-initializer.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-in-static.rs
yield-in-static.stderr
yield-subtype.rs Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-subtype.stderr Make closures and generators a must use types 2020-07-28 00:00:00 +00:00
yield-while-iterating.rs
yield-while-iterating.stderr
yield-while-local-borrowed.rs
yield-while-local-borrowed.stderr
yield-while-ref-reborrowed.rs
yield-while-ref-reborrowed.stderr