rust/tests/ui/borrowck/borrowck-block-uninit.rs
2023-04-17 09:16:07 +02:00

8 lines
144 B
Rust

fn force<F>(f: F) where F: FnOnce() { f(); }
fn main() {
let x: isize;
force(|| { //~ ERROR E0381
println!("{}", x);
});
}