Skip to content

Commit

Permalink
Rollup merge of rust-lang#81481 - lcnr:cast-tests, r=jackh726
Browse files Browse the repository at this point in the history
move some tests
  • Loading branch information
JohnTitor authored Feb 2, 2021
2 parents d4e3570 + 61f6fa7 commit 9860b31
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 9 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions src/test/ui/cast/unsupported-cast.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
struct A;

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

error: aborting due to previous error
Expand Down
7 changes: 0 additions & 7 deletions src/test/ui/unsupported-cast.rs

This file was deleted.

0 comments on commit 9860b31

Please sign in to comment.