Skip to content
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

error[E0658]: let...else statements are unstable #13801

Closed
nikola-bozin-org opened this issue Dec 20, 2022 · 7 comments
Closed

error[E0658]: let...else statements are unstable #13801

nikola-bozin-org opened this issue Dec 20, 2022 · 7 comments

Comments

@nikola-bozin-org
Copy link

nikola-bozin-org commented Dec 20, 2022

#13562

This did not work for me. I still get the same error?

Is there anything else i am missing?

Versions:
rustup 1.25.1 (bb60b1e89 2022-07-12)
rustc 1.66.0 (69f9c33d7 2022-12-12

@flodiebold
Copy link
Member

let-else is stable in 1.66, so if you're getting that error message you can't be compiling with 1.66. Maybe you have a local override, or are running some other cargo binary. Try running rustc --version and cargo --version inside the rust-analyzer folder if you didn't before.

@nikola-bozin-org
Copy link
Author

Here are the versions:
rustc 1.66.0 (69f9c33d7 2022-12-12)
cargo 1.66.0 (d65d197ad 2022-11-15)

I dont override version anywhere, im just using some crate from crates.io, but im not sure if that crate can possibly override the version?

@flodiebold
Copy link
Member

What do you mean by "I'm just using some crate from crates.io"? The issue you referenced is about compiling rust-analyzer, is that not what you're trying to do?

@nikola-bozin-org
Copy link
Author

Ohhh, it seems i created issue in wrong section because i used some crates, and those crates contain the error that i referenced. But yes, compilation did not work.

Do you maybe have any other solutions?

@flodiebold
Copy link
Member

If you're just trying to compile some crate and getting this error without rust-analyzer being involved, this is indeed the wrong place for this issue 🙂

If you're just running e.g. cargo check in a project and getting this error, and cargo --version says 1.66, I don't know how that could happen. I would suggest asking the owner of the crate that's failing to build.

@nikola-bozin-org
Copy link
Author

Yes, i am running cargo check and my cargo--version is cargo 1.66.0 (d65d197ad 2022-11-15) . Is it possible that crate is overriding version?

@flodiebold
Copy link
Member

Your project can have a rust-toolchain file that overrides the version, but that would show up in cargo --version. Dependencies can't override the compiler they're compiled with, everything gets compiled by the compiler you invoked (unless they're doing some build.rs shenanigans).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants