rust/tests/ui/coroutine/unsized-local-across-yield.rs
2025-06-13 01:16:36 +02:00

21 lines
371 B
Rust

#![feature(coroutine_trait)]
#![feature(coroutines)]
use std::ops::Coroutine;
fn across() -> impl Coroutine {
#[coroutine]
move || {
let b: [u8] = *(Box::new([]) as Box<[u8]>);
//~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
yield;
for elem in b.iter() {}
}
}
fn main() {
across();
}