Closed chrisjsewell closed 5 months ago
Here is the trace output:
This is also affecting basic Option
de-structuring, like:
fn main() {
match Some(1) {
Some(i) if i > 1 => println!("1"),
_ => println!("2")
}
}
This still works fine for me, sounds like your sysroot is suddenly failing (that is your standard library doesn't seem to resolve). Are there are any warnings or errors in the logs? Does the status bar item say anything? (the trace isn't useful here, its mainly for LSP layer debugging)
Heya, thanks for the reply, I fixed it!
I ran rustup update
and now it works:
stable-aarch64-apple-darwin updated - rustc 1.77.1 (7cf61ebde 2024-03-27) (from rustc 1.76.0 (07dca489a 2024-02-04))
perhaps there was an update that broke support for 1.76.0
?
anyhow I will close this
rust-analyzer version: rust-analyzer version: 0.3.1906-standalone (e4a405f87 2024-03-31)
rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
editor or extension: VSCode v0.3.1906
relevant settings: NONE
repository link (if public, optional): (eg. rust-analyzer)
code snippet to reproduce:
after running
cargo init
to create a new project, then add tomain.rs
This seems to have suddenly started happening in the last day, I'm not sure why 🤷
you can see below, it does not seem to infer the type of a
Some
Then for
items
, its ok normally, but then breaks on use offor
loop (there is no hover or method completion foritem
)Note, there are no log outputs from
Output > Rust Analyzer Language Server