Proposal: use &'db
in tracked struct declaration for return_ref
#582
Labels
bikeshed 🚴♀️
Debating API details and the like
rfc
Active discussion about a possible future feature
Milestone
Salsa currently supports the
#[return_ref]
declaration to tag fields whose values are expensive to clone:This is fine but kinda annoying in its own way. I was wondering if we should write instead:
but have that be treated specially such that when you create the struct, we "peel off" the
&'db
and replace it withVec<SymLocalVariable<'db>>
. The idea is that you are declaring the field type as it will be returned to you via an accessor, instead of the field type as it will be created -- and since we never support&'db
field types, we can instead make it require an owned value.The text was updated successfully, but these errors were encountered: