summaryrefslogtreecommitdiffstats
path: root/tests/ui/binop/binary-op-on-fn-ptr-eq.rs
blob: 8e20640b58d94898735c73640ba3f3936a90ae0b (plain)
1
2
3
4
5
6
7
8
9
// run-pass
// Tests equality between supertype and subtype of a function
// See the issue #91636
fn foo(_a: &str) {}

fn main() {
    let x = foo as fn(&'static str);
    let _ = x == foo;
}