2022-10-04 22:35:50 -05:00
|
|
|
#![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();
|
2023-01-04 21:02:10 -06:00
|
|
|
//~^ ERROR this method takes 1 argument but 0 arguments were supplied
|
2022-10-04 22:35:50 -05:00
|
|
|
// This type error is required to reproduce the ICE...
|
|
|
|
}
|
|
|
|
|
|
|
|
fn _zzz() {
|
|
|
|
()
|
|
|
|
}
|