Skip to content
This repository was archived by the owner on Mar 28, 2024. It is now read-only.

Cargo compile fails: error[E0658]: let...else statements are unstable #15

Closed
anemovva opened this issue Dec 27, 2022 · 1 comment
Closed

Comments

@anemovva
Copy link
Contributor

When I try to compile the project with cargo build --release, the compile fails with the following error:
error[E0658]: let...else statements are unstable.

The full error is:
error[E0658]: let...else statements are unstable
--> src/hist_file.rs:16:5
|
16 | let Ok(histfile_buffer) = std::fs::File::open(&args.file) else { panic!("Please specify a valid histfile")};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #87335 rust-lang/rust#87335 for more information
= help: add #![feature(let_else)] to the crate attributes to enable

For more information about this error, try rustc --explain E0658.
error: could not compile muc due to previous error /0.3s

I am using rustup version 1.25.1-2.

@nthnd
Copy link
Owner

nthnd commented Dec 27, 2022

I started coding this in rust 1.6.5. iirc that was when let ... else became stable. Compile it in a later version for it to work.

@nthnd nthnd closed this as completed Dec 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants