nostr:nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpq4cgq353exzmhdsvqjtmw4dq7fvyleuls8umyrvd5umhr4gtx6asqzk33ng yeah, I'm doing parse nodes, and have a `fn matches<'a>(buffer : &Chars<'a>) -> (bool, Chars<'a>);`, and I hope this means that the second return value is in the same `str` referenced by `buffer`.

But I'm totally not sure. And it doesn't work if I pull the <'a> after "matches".

Reply to this note

Please Login to reply.

Discussion

I do know that the placement of the lifetime parameter is imprtsmt. Gotta define a function with lifetimes and be specified before the parameters . its something to do with the complier has to know how lifetimes relate to each other when function sigs are checked.

< 'a > after 'matches' will confuse the complier to associate the lifetime with the parameters.