Open ErichDonGubler opened 5 years ago
I'm a beginner in rust and I don't feel I'd be able to fix this issue. Is there a recommended workaround? Circumventing the need for a lifetime I expect?
I have no idea how to resolve a similar-looking error. main()
it is, then.
It does not work with impl Trait
as return time either.
From what I understand it is because the return type of the generator is used to define a field in the RunnerStruct
.
I came across this limitation recently and I opted to simply not use a generator in my solution. This meant simply calling my parsing function from within my solution function.
When one uses a return value with a lifetime in it,
#[aoc(...)]
panicks with an error similar to:You can check out a fully-reproducible example that the above is based on in the
lifetime-problems
branch of my AoC2018 solutions. The most interesting file isday6.rs
, which I'll inline for posterity since I'll be deleting that branch once this issue is resolved: