flux-rs / flux

Refinement Types for Rust
MIT License
663 stars 21 forks source link

ICE: `check_oblig_fn_trait_pred` #767

Closed enjhnsn2 closed 2 months ago

enjhnsn2 commented 3 months ago

The following code:

#[flux_rs::trusted]
fn access_grant<F: FnOnce() -> u32>(fun: F) -> u32 {
    unimplemented!()
}

pub fn try_enter<F: FnOnce() -> u32>(fun: F) -> u32 {
    access_grant(fun)
}

causes an ICE:

error: internal compiler error: crates/flux-refineck/src/checker.rs:692:13: check_oblig_fn_trait_pred: unexpected self_ty F

thread 'rustc' panicked at crates/flux-refineck/src/checker.rs:692:13: