From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr (limited to 'tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr') 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`. -- cgit v1.2.3