Raise error if pure misuse.

This commit is contained in:
Stephen Chung
2021-02-26 18:28:21 +08:00
parent 823ecef1f1
commit 37fe14ba16
3 changed files with 20 additions and 20 deletions

View File

@@ -1,8 +1,8 @@
error: functions marked with 'return_raw' must return Result<Dynamic, Box<EvalAltResult>>
--> $DIR/export_fn_raw_noreturn.rs:10:5
|
10 | pub fn test_fn(input: &mut Point) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
--> $DIR/export_fn_raw_noreturn.rs:9:13
|
9 | #[export_fn(return_raw)]
| ^^^^^^^^^^
error[E0425]: cannot find function `test_fn` in this scope
--> $DIR/export_fn_raw_noreturn.rs:19:5

View File

@@ -1,8 +1,8 @@
error: functions marked with 'return_raw' must return Result<Dynamic, Box<EvalAltResult>>
--> $DIR/export_mod_raw_noreturn.rs:12:5
--> $DIR/export_mod_raw_noreturn.rs:11:11
|
12 | pub fn test_fn(input: &mut Point) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 | #[rhai_fn(return_raw)]
| ^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared crate or module `test_mod`
--> $DIR/export_mod_raw_noreturn.rs:22:5