mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
15 lines
304 B
Rust
15 lines
304 B
Rust
#![feature(generators, generator_trait)]
|
|
|
|
use std::ops::Generator;
|
|
use std::pin::Pin;
|
|
|
|
fn main() {
|
|
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
|
|
}
|