summaryrefslogtreecommitdiffstats
path: root/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr')
-rw-r--r--src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr
new file mode 100644
index 000000000..3b5b8ea69
--- /dev/null
+++ b/src/test/ui/cast/cast-to-unsized-trait-object-suggestion.stderr
@@ -0,0 +1,19 @@
+error[E0620]: cast to unsized type: `&{integer}` as `dyn Send`
+ --> $DIR/cast-to-unsized-trait-object-suggestion.rs:2:5
+ |
+LL | &1 as dyn Send;
+ | ^^^^^^--------
+ | |
+ | help: try casting to a reference instead: `&dyn Send`
+
+error[E0620]: cast to unsized type: `Box<{integer}>` as `dyn Send`
+ --> $DIR/cast-to-unsized-trait-object-suggestion.rs:3:5
+ |
+LL | Box::new(1) as dyn Send;
+ | ^^^^^^^^^^^^^^^--------
+ | |
+ | help: you can cast to a `Box` instead: `Box<dyn Send>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0620`.