Skip to content

Commit 86056b0

Browse files
Update weirdly failing ui tests
1 parent e07da7b commit 86056b0

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

tests/ui/codegen/equal-pointers-unequal/as-cast/inline2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323
let v = 0;
2424
&v as *const _ as usize
2525
};
26-
assert_eq!(a.to_string(), b.to_string());
26+
assert_eq!(format!("{a}"), format!("{b}"));
2727
assert_eq!(format!("{}", a == b), "true");
2828
assert_eq!(format!("{}", cmp_in(a, b)), "true");
2929
assert_eq!(format!("{}", cmp(a, b)), "true");

tests/ui/codegen/equal-pointers-unequal/as-cast/zero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn main() {
2121
// It's not zero, which means `a` and `b` are not equal.
2222
assert_ne!(i, 0);
2323
// But it looks like zero...
24-
assert_eq!(i.to_string(), "0");
24+
assert_eq!(format!("{i}"), "0");
2525
// ...and now it *is* zero?
2626
assert_eq!(i, 0);
2727
// So `a` and `b` are equal after all?

tests/ui/codegen/equal-pointers-unequal/exposed-provenance/inline2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
let v = 0;
2626
ptr::from_ref(&v).expose_provenance()
2727
};
28-
assert_eq!(a.to_string(), b.to_string());
28+
assert_eq!(format!("{a}"), format!("{b}"));
2929
assert_eq!(format!("{}", a == b), "true");
3030
assert_eq!(format!("{}", cmp_in(a, b)), "true");
3131
assert_eq!(format!("{}", cmp(a, b)), "true");

tests/ui/codegen/equal-pointers-unequal/exposed-provenance/zero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323
// It's not zero, which means `a` and `b` are not equal.
2424
assert_ne!(i, 0);
2525
// But it looks like zero...
26-
assert_eq!(i.to_string(), "0");
26+
assert_eq!(format!("{i}"), "0");
2727
// ...and now it *is* zero?
2828
assert_eq!(i, 0);
2929
// So `a` and `b` are equal after all?

tests/ui/codegen/equal-pointers-unequal/strict-provenance/inline2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
let v = 0;
2626
ptr::from_ref(&v).addr()
2727
};
28-
assert_eq!(a.to_string(), b.to_string());
28+
assert_eq!(format!("{a}"), format!("{b}"));
2929
assert_eq!(format!("{}", a == b), "true");
3030
assert_eq!(format!("{}", cmp_in(a, b)), "true");
3131
assert_eq!(format!("{}", cmp(a, b)), "true");

tests/ui/codegen/equal-pointers-unequal/strict-provenance/zero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fn main() {
2323
// It's not zero, which means `a` and `b` are not equal.
2424
assert_ne!(i, 0);
2525
// But it looks like zero...
26-
assert_eq!(i.to_string(), "0");
26+
assert_eq!(format!("{i}"), "0");
2727
// ...and now it *is* zero?
2828
assert_eq!(i, 0);
2929
// So `a` and `b` are equal after all?

0 commit comments

Comments
 (0)