mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-27 18:56:24 +00:00
13 lines
249 B
Rust
13 lines
249 B
Rust
//@ run-pass
|
|
// Tests equality between supertype and subtype of a function
|
|
// See the issue #91636
|
|
|
|
#![allow(unpredictable_function_pointer_comparisons)]
|
|
|
|
fn foo(_a: &str) {}
|
|
|
|
fn main() {
|
|
let x = foo as fn(&'static str);
|
|
let _ = x == foo;
|
|
}
|