Open MichaReiser opened 3 days ago
Without the #[salsa::db]
, a function zalsa_db()
is required. Perhaps it would be possible to add another function fn you_forgot_salsa_db()
?
Coming from someone who hasn't spent a lot of time with macros, but I thought that could be a quick first step towards making this a little more clear.
The following example misses a
#[salsa::db]
on theimpl Db for Pimpl
but it only fails at runtime with a panic inas_view
.Ideally, we would catch this error at compile time. If this isn't possible, improve the error message to guide users towards the proper fix.