rust/tests/ui/closures/unsized_value_move.rs
2026-01-31 14:01:54 +01:00

8 lines
246 B
Rust

//! regression test for <https://github.com/rust-lang/rust/issues/17651>
// Test that moves of unsized values within closures are caught
// and rejected.
fn main() {
(|| Box::new(*(&[0][..])))();
//~^ ERROR the size for values of type
}