rust/tests/ui/coroutine/issue-102645.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
409 B
Rust
Raw Normal View History

2023-10-19 21:46:28 +00:00
#![feature(coroutines, coroutine_trait)]
2022-10-05 03:35:50 +00:00
2023-10-19 16:06:43 +00:00
use std::ops::Coroutine;
2022-10-05 03:35:50 +00:00
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 method takes 1 argument but 0 arguments were supplied
2022-10-05 03:35:50 +00:00
// This type error is required to reproduce the ICE...
}
fn _zzz() {
()
}