2021-12-14 01:19:10 +03:00
|
|
|
//@ run-pass
|
2021-12-14 00:15:50 +03:00
|
|
|
// Tests equality between supertype and subtype of a function
|
|
|
|
|
// See the issue #91636
|
2023-12-10 15:51:06 +01:00
|
|
|
|
|
|
|
|
#![allow(unpredictable_function_pointer_comparisons)]
|
|
|
|
|
|
2021-12-14 00:15:50 +03:00
|
|
|
fn foo(_a: &str) {}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
let x = foo as fn(&'static str);
|
|
|
|
|
let _ = x == foo;
|
|
|
|
|
}
|