minirust icon indicating copy to clipboard operation
minirust copied to clipboard

minimize: translate constant `FnPtr`

Open bifbof opened this issue 8 months ago • 1 comments

Allow for using constant FnPtr, the following fails:

fn main() {
    let f: fn(()) -> Option<()> = Some::<()>;
    f(());
}

and outputs the following error message:

thread 'rustc' panicked at minimize/src/bb.rs:178:13:
function pointers are not supported.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

~~related to #196~~

bifbof avatar Jun 20 '24 14:06 bifbof