-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest nightly
on edition 2024 results in compilation failure
#434
Comments
Hello @indietyp, thank you for reporting! Nightly isn’t stable, so I not rush before calling that a bug. Could you find the RFC or nightly feature that breaks the build? So I can read the details and see how likely it is going to break our code in the future. |
Yea sure, this has something to do with edition 2024, in which the impl capture rules are changed, see: rust-lang/rust#117587 and rust-lang/rfcs#3498 This has regressed between 2024-10-28 and 2024-11-04. Specifically in our example, the problem was with: fn callback<'s>(_: &mut Lexer<'s>) -> impl CallbackResult<'s, bool, TokenKind<'s>> {
false
} adding a In edition 2024 this captures both These callback functions are generated whenever someone specifies an inline callback closure, in our example this is: #[token("false", |_| false)]
#[token("true", |_| true)]
Bool(bool), |
Ok, I see, thanks for the links! Would you mind making a PR? |
I don't mind, it seems to be a relatively small change, the only problem I see is in detecting if someone is on edition 2024, any idea on how one might detect that? |
Ah this uses a new syntax that wasn't available before? If so, that means we will either have code-compatible prior to 2024, or post 2024, but not both, unless we use a third-party crate like |
In theory adding a I'd be willing to give that a try if you're okay with that, as that means we won't need to increase the MSRV. The std offers |
Yes, your suggestion looks great! |
Hey Im on 2024 and im Getting this Issue. I see you created and merged a PR. Any ETA on when a new version will comeout? |
GOAT |
The derive code generate by logos no longer compiles for edition 2024 on nightly-2024-11-04, compilation now results in the error:
The code resulting in the issue:
https://github.com/hashintel/hash/blob/fb84b5182d252203c5fc58eac6a68e67eb1144c7/libs/%40local/hql/syntax-jexpr/src/lexer/token_kind.rs#L10-L45
The text was updated successfully, but these errors were encountered: