summaryrefslogtreecommitdiffstats
path: root/src/test/ui/generator/issue-102645.rs
blob: 0589c5a009a1b1e2ce12fb3597fc2f38a6e8651e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// compile-flags: -Zdrop-tracking

#![feature(generators, generator_trait)]

use std::ops::Generator;
use std::pin::Pin;

fn main() {
    let mut a = 5;
    let mut b = || {
        let d = 6;
        yield;
        _zzz(); // #break
        a = d;
    };
    Pin::new(&mut b).resume();
    //~^ ERROR this function takes 1 argument but 0 arguments were supplied
    // This type error is required to reproduce the ICE...
}

fn _zzz() {
    ()
}