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 21:46:28 +00:00
#![feature(coroutines, coroutine_trait)]
2018-01-28 20:23:49 +01:00
2023-10-19 16:06:43 +00:00
use std::ops::Coroutine;
2018-10-04 20:49:38 +02:00
use std::pin::Pin;
2018-01-28 20:23:49 +01:00
fn main() {
2023-10-19 16:06:43 +00: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 20:23:49 +01:00
}