creusot
creusot copied to clipboard
Panic on using function pointer
I'd have been somewhat surprised if this code worked, but it should probably return an error message instead of a panic
fn some_fn_pointer() -> i32 {
2
}
fn main() {
let x = &some_fn_pointer;
let y = x();
}
Panics here.