-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
let...else
statements are unstable in solana-frozen-abi-macro-1.16.0
#32133
Comments
I'm having this error too |
I had the same issue, for now, I have downgraded the Rust version to 1.69.0, |
I get this error with either Solana 1.16.1 or 1.16.0 at rustc 1.69.0. |
me too |
@dmakarov - not sure if you have any idea as to what's going on here? The bug reports so far are super low quality here but seems like there's something not right. Unclear if this is an anchor issue or something with the platform tooling |
This is issue with Rust version used by libraries I believe it is 1.61 for Solana, honestly don't remember where remember it was in dependencies for workspace. So, I guess, newer syntax is used to compile with older version. So if code above is changed to to |
We'll update platform-tools to latest rust version soon. Until then we could patch frozen-abi-macro/src/lib.rs and add solana/frozen-abi/macro/src/lib.rs Line 422 in 42aa5d2
|
Works for me with this:
at rustc 1.69.0 (84c898d65 2023-04-16) |
This isn't an anchor specific issue. I can reproduce it attempting to build using rust 1.70 and dependency solana-program 1.16.1:
Compiling solana-frozen-abi-macro v1.16.1 |
These STR worked fine for me.
|
platform-tools 1.37 is based on rust 1.68. |
I can also confirm the issue reproduces with:
But this is also expected. One cannot expect to build solana-program 1.16.1 with the platform tools in 1.14 |
We could try adding https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field to crates like solana-program to make this error more explicit |
As of now, if I run |
|
Thank you, that worked for me. I think it would be very useful to have a |
Great. Hopefully starting with 1.16.2, we'll have a more explicit error when this condition occurs so it'll be more obvious that a newer version of the platform-tools needs to be installed. |
This worked for me |
Problem
While compiling anchor-lang = "0.28.0" project have got this error:
.cargo/registry/src/github.com-1ecc6299db9ec823/solana-frozen-abi-macro-1.16.0/src/lib.rs:422:5
422 let Some(expected_digest) = expected_digest else {
423 return Error::new_spanned(
424 TokenStream2::from(item),
425 "the required "digest" = ... attribute is missing.",
...
428 .into()
429 };
For more information about this error, try
rustc --explain E0658
.error: could not compile
solana-frozen-abi-macro
due to previous errorMy rustc -V: rustc 1.70.0 (90c541806 2023-05-31)
The text was updated successfully, but these errors were encountered: