]> git.lizzy.rs Git - rust.git/blob - src/test/ui/binop/binary-op-on-fn-ptr-eq.rs
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / binop / binary-op-on-fn-ptr-eq.rs
1 // run-pass
2 // Tests equality between supertype and subtype of a function
3 // See the issue #91636
4 fn foo(_a: &str) {}
5
6 fn main() {
7     let x = foo as fn(&'static str);
8     let _ = x == foo;
9 }