Open Samir-Rashid opened 1 month ago
The following cause Flux to crash on latest Flux & fixpoint.
pub fn foo<F>(f: F) where F: Fn(u32) -> bool, { if f(0) { println!("Hello"); } } pub fn foo2(f: impl Fn(u32) -> bool) { if f(0) { println!("Hello"); } }
error: internal compiler error: crates/flux-refineck/src/checker.rs:678:41: expected discr thread 'rustc' panicked at crates/flux-common/src/bug.rs:75:49: Box<dyn Any>
I believe function pointers fn are unsupported by flux (f: fn(u32) -> bool), but these closures (Fn, FnMut) cause Flux to crash.
fn
f: fn(u32) -> bool
Fn
FnMut
This is no longer crashing after the hack implemented in https://github.com/flux-rs/flux/pull/736. We should still find the root cause and implement a proper fix.
The following cause Flux to crash on latest Flux & fixpoint.
I believe function pointers
fn
are unsupported by flux (f: fn(u32) -> bool
), but these closures (Fn
,FnMut
) cause Flux to crash.