Forward compatibility fix for rustc PR 150681#620
Forward compatibility fix for rustc PR 150681#620meithecatte wants to merge 1 commit intosoftdevteam:masterfrom
Conversation
|
I don't see why (for future variants added to LexerKind) any reason we would need new variants that aren't |
|
Yup, that would also be a good fix. |
|
I might lean towards future flexibility (Changing the callback function), the only thing I could think of where we might need it was if some variation of a LRStreamingLexer needs a user provided buffer. I don't think it's likely but perhaps the planets align and whatever streaming regex library it uses needs some working space, this might be the right place to put that, and we wouldn't want to be cloning/copying that buffer. I Might be overthinking it, either way I'm happy with whatever @ltratt thinks. |
|
I've just looked into this -- I admit it took me a while to work out how the current code could work, so I think the rustc fix is a good one! -- and I agree that |
|
I will raise a PR for this and make a new release shortly after. |
|
Closed in favour of #621. |
Hello. A crater run for rust-lang/rust#150681 has found that your
lrlexcrate will stop compiling withcfg(test)with the rustc changes being considered. This PR preemptively fixes the issue to minimize disruption.Let me know if you have any questions.