Allow non-Dynamic in return_raw.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
error: functions marked with 'return_raw' must return Result<Dynamic, Box<EvalAltResult>>
|
||||
error: functions marked with 'return_raw' must return Result<T, Box<EvalAltResult>>
|
||||
--> $DIR/export_fn_raw_noreturn.rs:9:13
|
||||
|
|
||||
9 | #[export_fn(return_raw)]
|
||||
|
@@ -1,10 +1,9 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/export_fn_raw_return.rs:10:8
|
||||
error[E0599]: the method `map` exists for type `bool`, but its trait bounds were not satisfied
|
||||
--> $DIR/export_fn_raw_return.rs:10:33
|
||||
|
|
||||
9 | #[export_fn(return_raw)]
|
||||
| ------------------------ expected `Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>` because of return type
|
||||
10 | pub fn test_fn(input: Point) -> bool {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `bool`
|
||||
| ^^^^ method cannot be called on `bool` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: expected enum `Result<rhai::Dynamic, std::boxed::Box<rhai::EvalAltResult>>`
|
||||
found type `bool`
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`bool: std::iter::Iterator`
|
||||
which is required by `&mut bool: std::iter::Iterator`
|
||||
|
@@ -1,4 +1,4 @@
|
||||
error: functions marked with 'return_raw' must return Result<Dynamic, Box<EvalAltResult>>
|
||||
error: functions marked with 'return_raw' must return Result<T, Box<EvalAltResult>>
|
||||
--> $DIR/export_mod_raw_noreturn.rs:11:11
|
||||
|
|
||||
11 | #[rhai_fn(return_raw)]
|
||||
|
@@ -1,11 +1,9 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/export_mod_raw_return.rs:12:8
|
||||
error[E0599]: the method `map` exists for type `bool`, but its trait bounds were not satisfied
|
||||
--> $DIR/export_mod_raw_return.rs:12:33
|
||||
|
|
||||
9 | #[export_module]
|
||||
| ---------------- expected `Result<rhai::Dynamic, std::boxed::Box<EvalAltResult>>` because of return type
|
||||
...
|
||||
12 | pub fn test_fn(input: Point) -> bool {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `bool`
|
||||
| ^^^^ method cannot be called on `bool` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: expected enum `Result<rhai::Dynamic, std::boxed::Box<EvalAltResult>>`
|
||||
found type `bool`
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`bool: std::iter::Iterator`
|
||||
which is required by `&mut bool: std::iter::Iterator`
|
||||
|
@@ -6,5 +6,5 @@ error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
|
||||
|
|
||||
::: $WORKSPACE/src/dynamic.rs
|
||||
|
|
||||
| pub fn from<T: Variant + Clone>(value: T) -> Self {
|
||||
| pub fn from<T: Variant + Clone>(mut value: T) -> Self {
|
||||
| ----- required by this bound in `rhai::Dynamic::from`
|
||||
|
@@ -6,5 +6,5 @@ error[E0277]: the trait bound `NonClonable: Clone` is not satisfied
|
||||
|
|
||||
::: $WORKSPACE/src/dynamic.rs
|
||||
|
|
||||
| pub fn from<T: Variant + Clone>(value: T) -> Self {
|
||||
| pub fn from<T: Variant + Clone>(mut value: T) -> Self {
|
||||
| ----- required by this bound in `rhai::Dynamic::from`
|
||||
|
Reference in New Issue
Block a user