You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0261]: use of undeclared lifetime name `'a`
--> src/main.rs:36:12
|
31 | #[serde_inline_default]
| - lifetime `'a` is missing in item created through this procedural macro
...
36 | name: &'a str,
| ^^ undeclared lifetime
@rochacbruno creating a default for a reference is generally not supported in serde afaik. You'd have to use Cow<'a, str> instead of &'a str, support for lifetimes in generic arguments got added in v0.2.2.
Okay that's a bit weird, yesterday evening I had a similar example and it didn't compile haha, but yours does so all good.
v0.2.2 also has support for lifetimes references, so using at least this version should fix your problem.
It is not working when there is a lifetime
Originally posted by @rochacbruno in #1 (comment)
The text was updated successfully, but these errors were encountered: