about summary refs log tree commit diff
path: root/tests/ui/codegen/equal-pointers-unequal/exposed-provenance/function.rs
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2025-05-02 11:16:56 +0200
committerMara Bos <m-ou.se@m-ou.se>2025-05-02 11:19:20 +0200
commit6f1a54bad27c49071efc11bcdb57f1bf152f7cb9 (patch)
tree24e936548fbae5734937ac1d9bb306746c81d964 /tests/ui/codegen/equal-pointers-unequal/exposed-provenance/function.rs
parent6e23095adf9209614a45f7f75fea36dad7b92afb (diff)
downloadrust-6f1a54bad27c49071efc11bcdb57f1bf152f7cb9.tar.gz
rust-6f1a54bad27c49071efc11bcdb57f1bf152f7cb9.zip
Remove fragile equal-pointers-unequal tests.
These randomly break when i change the implementation of format_args!().
Diffstat (limited to 'tests/ui/codegen/equal-pointers-unequal/exposed-provenance/function.rs')
-rw-r--r--tests/ui/codegen/equal-pointers-unequal/exposed-provenance/function.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/ui/codegen/equal-pointers-unequal/exposed-provenance/function.rs b/tests/ui/codegen/equal-pointers-unequal/exposed-provenance/function.rs
deleted file mode 100644
index bf130c9f759..00000000000
--- a/tests/ui/codegen/equal-pointers-unequal/exposed-provenance/function.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-//@ known-bug: #107975
-//@ compile-flags: -Copt-level=2
-//@ run-pass
-
-// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1434203908
-
-use std::ptr;
-
-fn f() -> usize {
-    let v = 0;
-    ptr::from_ref(&v).expose_provenance()
-}
-
-fn main() {
-    let a = f();
-    let b = f();
-
-    // `a` and `b` are not equal.
-    assert_ne!(a, b);
-    // But they are the same number.
-    assert_eq!(format!("{a}"), format!("{b}"));
-    // And they are equal.
-    assert_eq!(a, b);
-}