salsa/tests/compile-fail/span-input-setter.stderr
Niko Matsakis 68a3a7fceb wip
2024-07-19 08:05:39 -04:00

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);
| ++++