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 #13562

Closed
vizvasrj opened this issue Nov 6, 2022 · 6 comments · Fixed by #13569
Closed

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

vizvasrj opened this issue Nov 6, 2022 · 6 comments · Fixed by #13569

Comments

@vizvasrj
Copy link

vizvasrj commented Nov 6, 2022

error[E0658]: let...else statements are unstable
I am compiling rust analyzer and here it cause some problem
https://rust-analyzer.github.io/manual.html#building-from-source


└─# cargo xtask install                                                        1 ⨯
    Finished dev [unoptimized] target(s) in 0.26s
     Running `target/debug/xtask install`
$ cargo install --path crates/rust-analyzer --locked --force --features force-always-assert
  Installing rust-analyzer v0.0.0 (/root/Project/whatsapp-webhook/myrust/rust-analyzer/crates/rust-analyzer)
    Updating crates.io index
   Compiling ide v0.0.0 (/root/Project/whatsapp-webhook/myrust/rust-analyzer/crates/ide)
error[E0658]: `let...else` statements are unstable
  --> crates/ide/src/rename.rs:43:13
   |
43 | /             let Some(frange) = sema.original_range_opt(name_like.syntax()) else {
44 | |                 bail!("No references found at position");
45 | |             };
   | |______________^
   |
   = note: see issue #87335 <https://github.com/rust-lang/rust/issues/87335> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ide` due to previous error
error: failed to compile `rust-analyzer v0.0.0 (/root/Project/whatsapp-webhook/myrust/rust-analyzer/crates/rust-analyzer)`, intermediate artifacts can be found at `/root/Project/whatsapp-webhook/myrust/rust-analyzer/target`
Error: install server

Caused by:
    command exited with non-zero code `cargo install --path crates/rust-analyzer --locked --force --features force-always-assert`: 101
@lnicola
Copy link
Member

lnicola commented Nov 6, 2022

You need to use the latest stable toolchain.

@jhgg
Copy link
Contributor

jhgg commented Nov 6, 2022

You need to use the latest stable toolchain.

I wonder if we should include a rust-toolchain file in r-a git repo, so that cargo will automatically select the correct tool chain to build against?

@lnicola
Copy link
Member

lnicola commented Nov 6, 2022

There's a rust-version clause in the manifests, it just wasn't updated (just like a rust-toolchain.toml might not be). And I personally dislike the latter.

@Veykril
Copy link
Member

Veykril commented Nov 6, 2022

Ye we should just try to update the rust-version when a new release happens, I am not fond of a rust-toolchain file either

@jhgg
Copy link
Contributor

jhgg commented Nov 6, 2022

I am curious why are you not fond of the tool chain file?

@lnicola
Copy link
Member

lnicola commented Nov 7, 2022

I used to accumulate outdated toolchains installed by projects that were using them. That's fine for nightlies, but I don't see how it's better than the rust-version field (we're also using the 2021 edition, so a cargo that doesn't know about rust-version won't know about the edition either).

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

Successfully merging a pull request may close this issue.

4 participants