rust/src/test/ui/generator/sized-yield.rs
2018-12-25 21:08:33 -07:00

14 lines
279 B
Rust

#![feature(generators, generator_trait)]
use std::ops::Generator;
fn main() {
let s = String::from("foo");
let mut gen = move || {
//~^ ERROR the size for values of type
yield s[..];
};
unsafe { gen.resume(); }
//~^ ERROR the size for values of type
}