rust/tests/ui/generator/sized-yield.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
304 B
Rust
Raw Normal View History

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