summaryrefslogtreecommitdiffstats
path: root/tests/ui/generator/yield-subtype.rs
blob: cb3fc909145c2f88aa09b561695c7b2be107351c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass
#![allow(dead_code)]
#![allow(dead_code)]

#![feature(generators)]

fn bar<'a>() {
    let a: &'static str = "hi";
    let b: &'a str = a;

    || { //~ WARN unused generator that must be used
        yield a;
        yield b;
    };
}

fn main() {}