Do not assume anything about repeated reification of generic functions.

This commit is contained in:
Camille GILLOT 2023-05-14 13:27:07 +00:00
parent db50bd96e5
commit 644e40f536

View File

@ -75,7 +75,6 @@ fn main() {
let g = f as fn() -> i32;
assert!(return_fn_ptr(g) == g);
assert!(return_fn_ptr(g) as unsafe fn() -> i32 == g as fn() -> i32 as unsafe fn() -> i32);
assert!(return_fn_ptr(f) != f);
// Any non-null value is okay for function pointers.
unsafe {