2018-01-28 20:23:49 +01:00
|
|
|
#![feature(generators, generator_trait)]
|
|
|
|
|
|
|
|
use std::ops::Generator;
|
2018-10-04 20:49:38 +02:00
|
|
|
use std::pin::Pin;
|
2018-01-28 20:23:49 +01:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = String::from("foo");
|
2018-06-09 16:53:36 -07:00
|
|
|
let mut gen = move || {
|
2018-07-10 23:10:13 +02:00
|
|
|
//~^ ERROR the size for values of type
|
2018-01-28 20:23:49 +01:00
|
|
|
yield s[..];
|
|
|
|
};
|
2020-01-25 20:03:10 +01:00
|
|
|
Pin::new(&mut gen).resume(());
|
2018-07-10 23:10:13 +02:00
|
|
|
//~^ ERROR the size for values of type
|
2018-01-28 20:23:49 +01:00
|
|
|
}
|