Fix codegen test error display.

This commit is contained in:
Stephen Chung 2021-02-09 14:34:51 +08:00
parent 88b01d6aba
commit 4815de3634
2 changed files with 6 additions and 6 deletions

View File

@ -2,9 +2,9 @@ error[E0308]: mismatched types
--> $DIR/export_fn_raw_return.rs:10:8 --> $DIR/export_fn_raw_return.rs:10:8
| |
9 | #[export_fn(return_raw)] 9 | #[export_fn(return_raw)]
| ------------------------ expected `std::result::Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>` because of return type | ------------------------ expected `Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>` because of return type
10 | pub fn test_fn(input: Point) -> bool { 10 | pub fn test_fn(input: Point) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `bool` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `bool`
| |
= note: expected enum `std::result::Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>` = note: expected enum `Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>`
found type `bool` found type `bool`

View File

@ -2,10 +2,10 @@ error[E0308]: mismatched types
--> $DIR/export_mod_raw_return.rs:12:8 --> $DIR/export_mod_raw_return.rs:12:8
| |
9 | #[export_module] 9 | #[export_module]
| ---------------- expected `std::result::Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>` because of return type | ---------------- expected `Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>` because of return type
... ...
12 | pub fn test_fn(input: Point) -> bool { 12 | pub fn test_fn(input: Point) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found `bool` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `bool`
| |
= note: expected enum `std::result::Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>` = note: expected enum `Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>`
found type `bool` found type `bool`