Fix codegen test results.
This commit is contained in:
parent
33fa57d95b
commit
f3b5df09af
@ -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",
|
||||
))
|
||||
}
|
||||
|
@ -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 {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -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 {
|
||||
| ^^^^^^^^^^^^
|
||||
|
@ -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 {
|
||||
| ^^^^^^^^^^^^
|
||||
|
@ -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 {
|
||||
| ^^^^^^^
|
||||
|
@ -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 {
|
||||
| ^^^^^^^^^^^^
|
||||
|
Loading…
Reference in New Issue
Block a user