mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
16 lines
354 B
Rust
16 lines
354 B
Rust
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
|
|
|
|
use std::ops::Coroutine;
|
|
use std::pin::Pin;
|
|
|
|
fn main() {
|
|
let s = String::from("foo");
|
|
let mut gen = #[coroutine]
|
|
move || {
|
|
//~^ ERROR the size for values of type
|
|
yield s[..];
|
|
};
|
|
Pin::new(&mut gen).resume(());
|
|
//~^ ERROR the size for values of type
|
|
}
|