diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/binop/binary-op-on-fn-ptr-eq.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/binop/binary-op-on-fn-ptr-eq.rs b/src/test/ui/binop/binary-op-on-fn-ptr-eq.rs new file mode 100644 index 000000000..8e20640b5 --- /dev/null +++ b/src/test/ui/binop/binary-op-on-fn-ptr-eq.rs @@ -0,0 +1,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; +} |