summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/min_const_fn
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/min_const_fn')
-rw-r--r--tests/ui/consts/min_const_fn/cmp_fn_pointers.rs2
-rw-r--r--tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr14
2 files changed, 5 insertions, 11 deletions
diff --git a/tests/ui/consts/min_const_fn/cmp_fn_pointers.rs b/tests/ui/consts/min_const_fn/cmp_fn_pointers.rs
index 9a2775688..c5990a7f5 100644
--- a/tests/ui/consts/min_const_fn/cmp_fn_pointers.rs
+++ b/tests/ui/consts/min_const_fn/cmp_fn_pointers.rs
@@ -1,6 +1,6 @@
const fn cmp(x: fn(), y: fn()) -> bool {
unsafe { x == y }
- //~^ ERROR can't compare
+ //~^ ERROR pointers cannot
}
fn main() {}
diff --git a/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr b/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
index 8a1b20a33..3845068d8 100644
--- a/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
+++ b/tests/ui/consts/min_const_fn/cmp_fn_pointers.stderr
@@ -1,16 +1,10 @@
-error[E0277]: can't compare `fn()` with `_` in const contexts
- --> $DIR/cmp_fn_pointers.rs:2:16
+error: pointers cannot be reliably compared during const eval
+ --> $DIR/cmp_fn_pointers.rs:2:14
|
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 }
- | ^^
+ = note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
error: aborting due to previous error
-For more information about this error, try `rustc --explain E0277`.