Closed thomaseizinger closed 9 months ago
Just realized this doesn't (yet) work for generic types, like Option<&str>
...
@Pitasi What do you think of this approach in general?
Sorry for late reply @thomaseizinger, I'm taking some time off as I'm getting married next week :)
Anyway, is there a way of letting the users specify their lifetimes? I think it would be better so one can even have multiple lifetimes (or generics?) if needed
I think it would be better so one can even have multiple lifetimes (or generics?) if needed
Why would you ever need more than one lifetime? Having to write them out is quite tedious. I was hoping that we can avoid that and hide the fact that we are generating a struct in the background as much as possible. In other words, act as if we should just perform lifetime-elision like rustc
does for normal functions!
This patch allows users to declare parameters as references if they are using the auto-generated props. These parameters would normally need a lifetime but we simply tack one on automatically if it doesn't already have one!