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