2024-04-04 10:21:33 +00:00
|
|
|
error[E0308]: mismatched types
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/span-tracked-getter.rs:9:13
|
|
|
|
|
|
|
|
|
9 | x.field(22);
|
|
|
|
| ----- ^^ expected `&_`, found integer
|
|
|
|
| |
|
|
|
|
| arguments to this method are incorrect
|
|
|
|
|
|
|
|
|
= note: expected reference `&_`
|
|
|
|
found type `{integer}`
|
2024-04-04 10:21:33 +00:00
|
|
|
note: method defined here
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/span-tracked-getter.rs:3:5
|
|
|
|
|
|
|
|
|
1 | #[salsa::tracked]
|
|
|
|
| -----------------
|
|
|
|
2 | pub struct MyTracked<'db> {
|
|
|
|
3 | field: u32,
|
|
|
|
| ^^^^^
|
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
9 | x.field(&22);
|
|
|
|
| +
|
|
|
|
|
|
|
|
warning: variable does not need to be mutable
|
|
|
|
--> tests/compile-fail/span-tracked-getter.rs:13:9
|
|
|
|
|
|
2024-07-27 12:29:41 +00:00
|
|
|
13 | let mut db = salsa::DatabaseImpl::new();
|
2024-07-19 12:05:39 +00:00
|
|
|
| ----^^
|
|
|
|
| |
|
|
|
|
| help: remove this `mut`
|
2024-04-04 10:21:33 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
= note: `#[warn(unused_mut)]` on by default
|