mirror of
https://github.com/salsa-rs/salsa.git
synced 2024-11-24 20:20:26 +00:00
22 lines
645 B
Text
22 lines
645 B
Text
error[E0308]: mismatched types
|
|
--> tests/compile-fail/span-input-setter.rs:10:21
|
|
|
|
|
10 | input.set_field(22);
|
|
| --------- ^^ expected `&mut _`, found integer
|
|
| |
|
|
| arguments to this method are incorrect
|
|
|
|
|
= note: expected mutable reference `&mut _`
|
|
found type `{integer}`
|
|
note: method defined here
|
|
--> tests/compile-fail/span-input-setter.rs:3:5
|
|
|
|
|
1 | #[salsa::input]
|
|
| ---------------
|
|
2 | pub struct MyInput {
|
|
3 | field: u32,
|
|
| ^^^^^
|
|
help: consider mutably borrowing here
|
|
|
|
|
10 | input.set_field(&mut 22);
|
|
| ++++
|