Remove fragile equal-pointers-unequal tests.
These randomly break when i change the implementation of format_args!().
This commit is contained in:
parent
6e23095adf
commit
6f1a54bad2
9 changed files with 0 additions and 201 deletions
|
|
@ -1,21 +0,0 @@
|
|||
//@ known-bug: #107975
|
||||
//@ compile-flags: -Copt-level=2
|
||||
//@ run-pass
|
||||
|
||||
fn main() {
|
||||
let a: usize = {
|
||||
let v = 0u8;
|
||||
&v as *const _ as usize
|
||||
};
|
||||
let b: usize = {
|
||||
let v = 0u8;
|
||||
&v as *const _ as usize
|
||||
};
|
||||
|
||||
// `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);
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
//@ known-bug: #107975
|
||||
//@ compile-flags: -Copt-level=2
|
||||
//@ run-pass
|
||||
|
||||
// Based on https://github.com/rust-lang/rust/issues/107975#issuecomment-1434203908
|
||||
|
||||
fn f() -> usize {
|
||||
let v = 0;
|
||||
&v as *const _ as usize
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
//@ known-bug: #107975
|
||||
//@ compile-flags: -Copt-level=2
|
||||
//@ run-pass
|
||||
|
||||
// https://github.com/rust-lang/rust/issues/107975#issuecomment-1430704499
|
||||
|
||||
fn main() {
|
||||
let a = {
|
||||
let v = 0;
|
||||
&v as *const _ as usize
|
||||
};
|
||||
let b = {
|
||||
let v = 0;
|
||||
&v as *const _ as usize
|
||||
};
|
||||
|
||||
assert_ne!(a, b);
|
||||
println!("{a}"); // or b
|
||||
assert_eq!(a, b);
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
//@ known-bug: #107975
|
||||
//@ compile-flags: -Copt-level=2
|
||||
//@ run-pass
|
||||
|
||||
use std::ptr;
|
||||
|
||||
fn main() {
|
||||
let a: usize = {
|
||||
let v = 0u8;
|
||||
ptr::from_ref(&v).expose_provenance()
|
||||
};
|
||||
let b: usize = {
|
||||
let v = 0u8;
|
||||
ptr::from_ref(&v).expose_provenance()
|
||||
};
|
||||
|
||||
// `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);
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
//@ known-bug: #107975
|
||||
//@ compile-flags: -Copt-level=2
|
||||
//@ run-pass
|
||||
|
||||
// https://github.com/rust-lang/rust/issues/107975#issuecomment-1430704499
|
||||
|
||||
use std::ptr;
|
||||
|
||||
fn main() {
|
||||
let a: usize = {
|
||||
let v = 0;
|
||||
ptr::from_ref(&v).expose_provenance()
|
||||
};
|
||||
let b: usize = {
|
||||
let v = 0;
|
||||
ptr::from_ref(&v).expose_provenance()
|
||||
};
|
||||
|
||||
assert_ne!(a, b);
|
||||
println!("{a}"); // or b
|
||||
assert_eq!(a, b);
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
//@ known-bug: #107975
|
||||
//@ compile-flags: -Copt-level=2
|
||||
//@ run-pass
|
||||
|
||||
use std::ptr;
|
||||
|
||||
fn main() {
|
||||
let a: usize = {
|
||||
let v = 0u8;
|
||||
ptr::from_ref(&v).addr()
|
||||
};
|
||||
let b: usize = {
|
||||
let v = 0u8;
|
||||
ptr::from_ref(&v).addr()
|
||||
};
|
||||
|
||||
// `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);
|
||||
}
|
||||
|
|
@ -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).addr()
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
//@ known-bug: #107975
|
||||
//@ compile-flags: -Copt-level=2
|
||||
//@ run-pass
|
||||
|
||||
// https://github.com/rust-lang/rust/issues/107975#issuecomment-1430704499
|
||||
|
||||
use std::ptr;
|
||||
|
||||
fn main() {
|
||||
let a: usize = {
|
||||
let v = 0;
|
||||
ptr::from_ref(&v).addr()
|
||||
};
|
||||
let b: usize = {
|
||||
let v = 0;
|
||||
ptr::from_ref(&v).addr()
|
||||
};
|
||||
|
||||
assert_ne!(a, b);
|
||||
println!("{a}"); // or b
|
||||
assert_eq!(a, b);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue