Fix codegen test results.

This commit is contained in:
Stephen Chung 2021-02-26 20:14:23 +08:00
parent 33fa57d95b
commit f3b5df09af
6 changed files with 6 additions and 6 deletions

View File

@ -537,7 +537,7 @@ impl ExportedFn {
// 2a. Property getters must take only the subject as an argument.
FnSpecialAccess::Property(Property::Get(_)) if self.arg_count() != 1 => {
return Err(syn::Error::new(
self.signature.span(),
self.signature.inputs.span(),
"property getter requires exactly 1 parameter",
))
}

View File

@ -1,5 +1,5 @@
error: property getter requires exactly 1 parameter
--> $DIR/rhai_fn_getter_signature.rs:13:9
--> $DIR/rhai_fn_getter_signature.rs:13:20
|
13 | pub fn test_fn(input: Point, value: bool) -> bool {
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,5 +1,5 @@
error: index getter requires exactly 2 parameters
--> $DIR/rhai_fn_index_getter_signature.rs:13:9
--> $DIR/rhai_fn_index_getter_signature.rs:13:20
|
13 | pub fn test_fn(input: Point) -> bool {
| ^^^^^^^^^^^^

View File

@ -1,5 +1,5 @@
error: index setter requires exactly 3 parameters
--> $DIR/rhai_fn_setter_index_signature.rs:13:9
--> $DIR/rhai_fn_setter_index_signature.rs:13:20
|
13 | pub fn test_fn(input: Point) -> bool {
| ^^^^^^^^^^^^

View File

@ -1,5 +1,5 @@
error: property setter cannot return any value
--> $DIR/rhai_fn_setter_return.rs:13:9
--> $DIR/rhai_fn_setter_return.rs:13:51
|
13 | pub fn test_fn(input: &mut Point, value: f32) -> bool {
| ^^^^^^^

View File

@ -1,5 +1,5 @@
error: property setter requires exactly 2 parameters
--> $DIR/rhai_fn_setter_signature.rs:13:9
--> $DIR/rhai_fn_setter_signature.rs:13:20
|
13 | pub fn test_fn(input: Point) -> bool {
| ^^^^^^^^^^^^