2022-09-07 19:09:33 +00:00
|
|
|
error: `data` option not allowed here
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:8:18
|
|
|
|
|
|
|
|
|
8 | #[salsa::tracked(data = Data)]
|
|
|
|
| ^^^^
|
2022-09-07 19:09:33 +00:00
|
|
|
|
|
|
|
error: `db` option not allowed here
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:13:18
|
2022-09-07 19:09:33 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
13 | #[salsa::tracked(db = Db)]
|
|
|
|
| ^^
|
2022-09-07 19:09:33 +00:00
|
|
|
|
|
|
|
error: `constructor` option not allowed here
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:18:18
|
2022-09-07 19:09:33 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
18 | #[salsa::tracked(constructor = TrackedFn3)]
|
|
|
|
| ^^^^^^^^^^^
|
2022-09-07 19:09:33 +00:00
|
|
|
|
|
|
|
error: #[salsa::tracked] must also be applied to the impl block for tracked methods
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:27:55
|
2022-09-07 19:09:33 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
27 | fn tracked_fn_with_receiver_not_applied_to_impl_block(&self, db: &dyn Db) -> u32 {}
|
|
|
|
| ^^^^^
|
2022-09-07 19:09:33 +00:00
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
error: only functions with a single salsa struct as their input can be specified
|
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:29:18
|
2022-09-07 21:19:05 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
29 | #[salsa::tracked(specify)]
|
|
|
|
| ^^^^^^^
|
2024-05-13 09:13:34 +00:00
|
|
|
|
2024-10-15 16:43:09 +00:00
|
|
|
error: must have a `'db` lifetime
|
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:44:9
|
|
|
|
|
|
|
|
|
44 | db: &dyn Db,
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: must have a `'db_lifetime` lifetime
|
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:52:9
|
|
|
|
|
|
|
|
|
52 | db: &dyn Db,
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: only a single lifetime parameter is accepted
|
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:67:39
|
|
|
|
|
|
|
|
|
67 | fn tracked_fn_with_multiple_lts<'db1, 'db2>(db: &'db1 dyn Db, interned: MyInterned<'db2>) -> u32 {
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
error[E0106]: missing lifetime specifier
|
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:61:15
|
|
|
|
|
|
|
|
|
61 | interned: MyInterned,
|
|
|
|
| ^^^^^^^^^^ expected named lifetime parameter
|
|
|
|
|
|
|
|
|
help: consider using the `'db` lifetime
|
|
|
|
|
|
|
|
|
61 | interned: MyInterned<'db>,
|
|
|
|
| +++++
|
|
|
|
|
2024-05-13 09:13:34 +00:00
|
|
|
error[E0308]: mismatched types
|
2024-07-19 12:05:39 +00:00
|
|
|
--> tests/compile-fail/tracked_fn_incompatibles.rs:24:46
|
2024-05-13 09:13:34 +00:00
|
|
|
|
|
2024-07-19 12:05:39 +00:00
|
|
|
23 | #[salsa::tracked]
|
|
|
|
| ----------------- implicitly returns `()` as its body has no tail or `return` expression
|
|
|
|
24 | fn tracked_fn_with_one_input(db: &dyn Db) -> u32 {}
|
|
|
|
| ^^^ expected `u32`, found `()`
|