salsa/tests/compile-fail/tracked_impl_incompatibles.stderr

70 lines
2.2 KiB
Text
Raw Normal View History

2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:6:18
2024-05-24 01:16:30 +00:00
|
2024-07-19 12:05:39 +00:00
6 | #[salsa::tracked(return_ref)]
2024-05-24 01:16:30 +00:00
| ^^^^^^^^^^
2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:11:18
|
2024-07-19 12:05:39 +00:00
11 | #[salsa::tracked(specify)]
| ^^^^^^^
2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:16:18
|
2024-07-19 12:05:39 +00:00
16 | #[salsa::tracked(no_eq)]
| ^^^^^
2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:21:18
|
2024-07-19 12:05:39 +00:00
21 | #[salsa::tracked(data = Data)]
| ^^^^
2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:26:18
|
2024-07-19 12:05:39 +00:00
26 | #[salsa::tracked(db = Db)]
| ^^
2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:31:18
|
2024-07-19 12:05:39 +00:00
31 | #[salsa::tracked(recover_fn = recover)]
| ^^^^^^^^^^
2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:36:18
|
2024-07-19 12:05:39 +00:00
36 | #[salsa::tracked(lru = 32)]
| ^^^
2024-07-19 12:05:39 +00:00
error: unexpected token
--> tests/compile-fail/tracked_impl_incompatibles.rs:41:18
|
2024-07-19 12:05:39 +00:00
41 | #[salsa::tracked(constructor = Constructor)]
| ^^^^^^^^^^^
2024-07-19 12:05:39 +00:00
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
--> tests/compile-fail/tracked_impl_incompatibles.rs:47:1
|
2024-07-19 12:05:39 +00:00
47 | impl<'db> std::default::Default for [MyTracked<'db>; 12] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------
| | |
| | this is not defined in the current crate because arrays are always foreign
| impl doesn't use only types from inside the current crate
|
= note: define and implement a trait or new type instead
error[E0308]: mismatched types
--> tests/compile-fail/tracked_impl_incompatibles.rs:48:21
|
48 | fn default() -> Self {}
| ------- ^^^^ expected `[MyTracked<'_>; 12]`, found `()`
| |
| implicitly returns `()` as its body has no tail or `return` expression
|
= note: expected array `[MyTracked<'db>; 12]`
found unit type `()`