mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Adjust test to still show miscompile
The capture of i in assert_ne!() is now known read-only, which enables early SROA. Block this by passing i to println, where we currently cannot recognize this.
This commit is contained in:
@@ -55,6 +55,7 @@ fn main() {
|
||||
// The `Box` has been deallocated by now, so this is a dangling reference!
|
||||
let r: &u8 = &*r;
|
||||
println!("{:p}", r);
|
||||
println!("{}", i);
|
||||
|
||||
// The following might segfault. Or it might not.
|
||||
// Depends on the platform semantics
|
||||
|
||||
@@ -58,6 +58,7 @@ fn main() {
|
||||
// The `Box` has been deallocated by now, so this is a dangling reference!
|
||||
let r: &u8 = &*r;
|
||||
println!("{:p}", r);
|
||||
println!("{}", i);
|
||||
|
||||
// The following might segfault. Or it might not.
|
||||
// Depends on the platform semantics
|
||||
|
||||
@@ -58,6 +58,7 @@ fn main() {
|
||||
// The `Box` has been deallocated by now, so this is a dangling reference!
|
||||
let r: &u8 = &*r;
|
||||
println!("{:p}", r);
|
||||
println!("{}", i);
|
||||
|
||||
// The following might segfault. Or it might not.
|
||||
// Depends on the platform semantics
|
||||
|
||||
Reference in New Issue
Block a user