about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2020-06-16 10:37:34 +0200
committerOliver Scherer <github35764891676564198441@oli-obk.de>2020-06-19 18:13:41 +0200
commite09b62033926dff8bfedca35b93e0dfbf767749f (patch)
treeb7002d10c8dce99dfd2ac5551f057bdd982db090 /src/test/ui/error-codes
parent9245ba83047b14fc7c9cef4c7d2bf37828c445b6 (diff)
downloadrust-e09b62033926dff8bfedca35b93e0dfbf767749f.tar.gz
rust-e09b62033926dff8bfedca35b93e0dfbf767749f.zip
Add fuzzy pointer comparison intrinsics
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0395.stderr5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0395.stderr b/src/test/ui/error-codes/E0395.stderr
index 748126f7440..62949cf15e1 100644
--- a/src/test/ui/error-codes/E0395.stderr
+++ b/src/test/ui/error-codes/E0395.stderr
@@ -4,8 +4,9 @@ error: pointers cannot be compared in a meaningful way during const eval.
 LL | static BAZ: bool = unsafe { (&FOO as *const i32) == (&BAR as *const i32) };
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: It is conceptually impossible for const eval to know in all cases whether two pointers are equal. While sometimes it is clear (the address of a static item is never equal to the address of another static item), comparing an integer address with any allocation's address is impossible to do at compile-time.
-   = note: That said, there's the `ptr_maybe_eq` intrinsic which returns `true` for all comparisons where CTFE isn't sure whether two addresses are equal. The mirror intrinsic `ptr_maybe_ne` returns `true` for all comparisons where CTFE isn't sure whether two addresses are inequal.
+   = note: see issue #53020 <https://github.com/rust-lang/rust/issues/53020> for more information
+   = note: It is conceptually impossible for const eval to know in all cases whether two pointers are equal. While sometimes it is clear (the address of a non-zst static item is never equal to the address of another non-zst static item), comparing an integer address with any allocation's address is impossible to do at compile-time.
+   = note: That said, there's the `<*const T>::guaranteed_eq` intrinsic which returns `true` for all comparisons where CTFE is sure that two addresses are equal. The mirror intrinsic `<*const T>::guaranteed_ne` returns `true` for all comparisons where CTFE is sure that two addresses are inequal.
 
 error: aborting due to previous error