fix tests

This commit is contained in:
vms 2021-04-04 23:46:35 +03:00
parent af0f503ca6
commit 440c5992c1
3 changed files with 31 additions and 2 deletions

View File

@ -24,7 +24,7 @@ jobs:
(cd fluence; cargo clippy -v --target wasm32-wasi) (cd fluence; cargo clippy -v --target wasm32-wasi)
(cd fluence-test; cargo build) (cd fluence-test; cargo build)
cargo test -v --all-features TARGET=wasm32-wasi cargo test -v --all-features
- save_cache: - save_cache:
paths: paths:

View File

@ -134,7 +134,7 @@ fn check_parsed_functions<'a>(
if contains_inner_ref(&arg.ty) { if contains_inner_ref(&arg.ty) {
return crate::syn_error!( return crate::syn_error!(
span, span,
"vector types in export function should take arguments only by value" "vector type in export functions should take arguments only by value"
); );
} }
} }

View File

@ -0,0 +1,29 @@
error: vector type in export functions should take arguments only by value
--> $DIR/array_inner_refs.rs:13:23
|
13 | pub fn inner_arrays_1(_arg: Vec<&Vec<Vec<Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: vector type in export functions should take arguments only by value
--> $DIR/array_inner_refs.rs:18:23
|
18 | pub fn inner_arrays_2(_arg: Vec<Vec<&Vec<Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: vector type in export functions should take arguments only by value
--> $DIR/array_inner_refs.rs:23:23
|
23 | pub fn inner_arrays_3(_arg: Vec<Vec<Vec<&Vec<u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: vector type in export functions should take arguments only by value
--> $DIR/array_inner_refs.rs:28:23
|
28 | pub fn inner_arrays_4(_arg: Vec<Vec<Vec<Vec<&u8>>>>) -> Vec<Vec<Vec<Vec<u8>>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: vector type in export functions should take arguments only by value
--> $DIR/array_inner_refs.rs:33:35
|
33 | pub fn inner_arrays_5(_arg1: i32, _arg2: Vec<Vec<Vec<&Vec<u8>>>>, _arg3: i32) -> Vec<Vec<Vec<Vec<u8>>>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^