Skip to content

Commit 9d41d0e

Browse files
committed
Move a compile-fail test to ui
1 parent a9b54ab commit 9d41d0e

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

src/test/compile-fail/cast-to-unsized-trait-object-suggestion.rs renamed to src/test/ui/cast-to-unsized-trait-object-suggestion.rs

-6
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,5 @@
1010

1111
fn main() {
1212
&1 as Send;
13-
//~^ ERROR cast to unsized type
14-
//~| HELP try casting to a reference instead:
15-
//~| SUGGESTION &1 as &Send;
1613
Box::new(1) as Send;
17-
//~^ ERROR cast to unsized type
18-
//~| HELP try casting to a `Box` instead:
19-
//~| SUGGESTION Box::new(1) as Box<Send>;
2014
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error: cast to unsized type: `&{integer}` as `std::marker::Send`
2+
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:12:5
3+
|
4+
12 | &1 as Send;
5+
| ^^^^^^----
6+
| |
7+
| help: try casting to a reference instead: `&Send`
8+
9+
error: cast to unsized type: `std::boxed::Box<{integer}>` as `std::marker::Send`
10+
--> $DIR/cast-to-unsized-trait-object-suggestion.rs:16:5
11+
|
12+
16 | Box::new(1) as Send;
13+
| ^^^^^^^^^^^^^^^----
14+
| |
15+
| help: try casting to a `Box` instead: `Box<Send>`
16+
17+
error: aborting due to 2 previous errors
18+

0 commit comments

Comments
 (0)