summaryrefslogtreecommitdiffstats
path: root/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr')
-rw-r--r--tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr b/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr
new file mode 100644
index 000000000..322681b97
--- /dev/null
+++ b/tests/ui/coercion/coerce-issue-49593-box-never.nofallback.stderr
@@ -0,0 +1,19 @@
+error[E0277]: the trait bound `(): std::error::Error` is not satisfied
+ --> $DIR/coerce-issue-49593-box-never.rs:18:53
+ |
+LL | /* *mut $0 is coerced to Box<dyn Error> here */ Box::<_ /* ! */>::new(x)
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()`
+ |
+ = note: required for the cast from `()` to the object type `dyn std::error::Error`
+
+error[E0277]: the trait bound `(): std::error::Error` is not satisfied
+ --> $DIR/coerce-issue-49593-box-never.rs:23:49
+ |
+LL | /* *mut $0 is coerced to *mut Error here */ raw_ptr_box::<_ /* ! */>(x)
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::error::Error` is not implemented for `()`
+ |
+ = note: required for the cast from `()` to the object type `(dyn std::error::Error + 'static)`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.