m4b / scroll

Scroll - making scrolling through buffers fun since 2016
MIT License
151 stars 36 forks source link

Pwrite deriving fails with "unparseable tokens" with struct containing lifetimes? #83

Closed RaitoBezarius closed 2 weeks ago

RaitoBezarius commented 1 year ago

Consider this structure:

#[derive(Pwrite)]
pub struct SymbolTable<'a> {
    symbols: &'a [u8],
}

(extracted from Goblin codebase)

This induces proc-macro derive produced unparseable tokens, on rustc 1.68.1.

I don't know what happens here.

m4b commented 1 year ago

That’s not good :/ must be something wrong with the scroll pwrite derive macro…

Frostie314159 commented 10 months ago

I'm currently working on fixing that and cleaning up some of the derive code.

m4b commented 8 months ago

Would love if we got this fixed, @Frostie314159 did you manage to take a look at this? (I know you were working on other things, and thank you, just doing triage here)

Frostie314159 commented 8 months ago

Yeah, I looked at the macro code and it's all a bit confusing, I couldn't work on this since I was busy with the 37c3, but maybe I can get back to this soon.

m4b commented 8 months ago

sounds good no rush, and if you don't feel like working on it, that's ok too :) anyway 0.12 scroll is out

Frostie314159 commented 8 months ago

That's good to hear, btw happy new year from germany.