summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr')
-rw-r--r--tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr b/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
new file mode 100644
index 000000000..8a1b20a33
--- /dev/null
+++ b/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
@@ -0,0 +1,16 @@
+error[E0277]: can't compare `fn()` with `_` in const contexts
+ --> $DIR/cmp_fn_pointers.rs:2:16
+ |
+LL | unsafe { x == y }
+ | ^^ no implementation for `fn() == _`
+ |
+ = help: the trait `~const PartialEq<_>` is not implemented for `fn()`
+note: the trait `PartialEq<_>` is implemented for `fn()`, but that implementation is not `const`
+ --> $DIR/cmp_fn_pointers.rs:2:16
+ |
+LL | unsafe { x == y }
+ | ^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.