salsa/tests/compile-fail/tracked_fn_incompatibles.stderr

38 lines
1.3 KiB
Text
Raw Normal View History

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)]
| ^^^^
error: `db` option not allowed here
2024-07-19 12:05:39 +00:00
--> tests/compile-fail/tracked_fn_incompatibles.rs:13:18
|
2024-07-19 12:05:39 +00:00
13 | #[salsa::tracked(db = Db)]
| ^^
error: `constructor` option not allowed here
2024-07-19 12:05:39 +00:00
--> tests/compile-fail/tracked_fn_incompatibles.rs:18:18
|
2024-07-19 12:05:39 +00:00
18 | #[salsa::tracked(constructor = TrackedFn3)]
| ^^^^^^^^^^^
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
|
2024-07-19 12:05:39 +00:00
27 | fn tracked_fn_with_receiver_not_applied_to_impl_block(&self, db: &dyn Db) -> u32 {}
| ^^^^^
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)]
| ^^^^^^^
error[E0308]: mismatched types
2024-07-19 12:05:39 +00:00
--> tests/compile-fail/tracked_fn_incompatibles.rs:24:46
|
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 `()`