minirust
minirust copied to clipboard
minimize: Coercion of `FnPtr` bug
fn f() {}
fn main() {
let _p = f as fn();
}
The local _p
is translated to type Ptr(FnPtr(Rust))
while f as fn()
is translated to type Ptr(FnPtr(C))
leading to a panic in well-formedness check as right and left type of assign statement have different types.
This is the output:
fatal error: program not well-formed (this is a bug in minimize):
Statement::Assign: destination and source type differ