Rollup merge of #139176 - m-ou-se:print3, r=compiler-errors
Remove fragile equal-pointers-unequal/*/print3.rs tests. These tests were added in #127003 The print3.rs tests stop working when I change implementation details of format_args!(). (For example, in https://github.com/rust-lang/rust/pull/139175 and https://github.com/rust-lang/rust/pull/139135). These tests shouldn't rely on such implementation details. It gets in the way for format_args!() improvements. If they test anything that aren't already covered by the other tests in this directory, they should be expressed in a less fragile way that doesn't rely on internal details of format_args!(). cc ``@GrigorenkoPV,`` author of these tests.
This commit is contained in:
commit
5b46e2462a
3 changed files with 0 additions and 73 deletions
|
@ -1,23 +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);
|
||||
assert_ne!(a, b);
|
||||
let c = a;
|
||||
assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "false true false");
|
||||
println!("{a} {b}");
|
||||
assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "true true true");
|
||||
}
|
|
@ -1,25 +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);
|
||||
assert_ne!(a, b);
|
||||
let c = a;
|
||||
assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "false true false");
|
||||
println!("{a} {b}");
|
||||
assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "true true true");
|
||||
}
|
|
@ -1,25 +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);
|
||||
assert_ne!(a, b);
|
||||
let c = a;
|
||||
assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "false true false");
|
||||
println!("{a} {b}");
|
||||
assert_eq!(format!("{} {} {}", a == b, a == c, b == c), "true true true");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue