rust/tests/ui/coroutine/sized-yield.rs

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

15 lines
315 B
Rust
Raw Normal View History

2023-10-19 16:46:28 -05:00
#![feature(coroutines, coroutine_trait)]
2018-01-28 13:23:49 -06:00
2023-10-19 11:06:43 -05:00
use std::ops::Coroutine;
2018-10-04 13:49:38 -05:00
use std::pin::Pin;
2018-01-28 13:23:49 -06:00
fn main() {
2023-10-19 11:06:43 -05:00
let s = String::from("foo");
let mut gen = move || {
//~^ ERROR the size for values of type
yield s[..];
};
Pin::new(&mut gen).resume(());
//~^ ERROR the size for values of type
2018-01-28 13:23:49 -06:00
}