2024-04-04 10:21:33 +00:00
|
|
|
error[E0308]: mismatched types
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/span-input-setter.rs:10:21
|
2024-04-04 10:21:33 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
10 | input.set_field(22);
|
|
|
|
| --------- ^^ expected `&mut _`, found integer
|
2024-04-04 10:21:33 +00:00
|
|
|
| |
|
|
|
|
| arguments to this method are incorrect
|
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
= note: expected mutable reference `&mut _`
|
2024-04-04 10:21:33 +00:00
|
|
|
found type `{integer}`
|
|
|
|
note: method defined here
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/span-input-setter.rs:3:5
|
2024-04-04 10:21:33 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
1 | #[salsa::input]
|
2024-04-04 10:21:33 +00:00
|
|
|
| ---------------
|
2024-07-19 12:05:39 +00:00
|
|
|
2 | pub struct MyInput {
|
|
|
|
3 | field: u32,
|
2024-04-04 10:21:33 +00:00
|
|
|
| ^^^^^
|
2024-07-19 12:05:39 +00:00
|
|
|
help: consider mutably borrowing here
|
|
|
|
|
|
|
|
|
10 | input.set_field(&mut 22);
|
|
|
|
| ++++
|