Skip to content

Commit e6e76c7

Browse files
Rollup merge of #81481 - lcnr:cast-tests, r=jackh726
move some tests
2 parents f61ab58 + 61f6fa7 commit e6e76c7

8 files changed

+7
-9
lines changed
File renamed without changes.
File renamed without changes.

src/test/ui/cast/unsupported-cast.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
struct A;
2+
3+
fn main() {
4+
println!("{:?}", 1.0 as *const A); //~ERROR casting `f64` as `*const A` is invalid
5+
}

src/test/ui/unsupported-cast.stderr renamed to src/test/ui/cast/unsupported-cast.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0606]: casting `f64` as `*const A` is invalid
2-
--> $DIR/unsupported-cast.rs:6:20
2+
--> $DIR/unsupported-cast.rs:4:20
33
|
4-
LL | println!("{:?}", 1.0 as *const A); // Can't cast float to foreign.
4+
LL | println!("{:?}", 1.0 as *const A);
55
| ^^^^^^^^^^^^^^^
66

77
error: aborting due to previous error

src/test/ui/unsupported-cast.rs

-7
This file was deleted.

0 commit comments

Comments
 (0)