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
|
|
|
}
|