Closed nilehmann closed 2 months ago
ah I know, it's probably because I'm matching on !
https://github.com/flux-rs/flux/blob/snapshot-for-ra/crates/flux-desugar/src/resolver.rs#L712
edit: ah no I don't think it's that. I commented that part and I still get the error.
67 is quite a long length for a substitution 😮 (edit: oh, its not a subst but a variable table 😅 ) I'll look into this if this is not resolved by the time I get back from vacation
I've tried rust-analyzer analysis-stats and opening most of the .rs files - including crates/flux-desugar/src/resolver.rs - in flux with my editor but failed to reproduce this.
Could you let me know in which file were you hovering when this panic happned? @nilehmann
edit: oh, nevermind. I've managed to 😅 crates/flux-desugar/src/resolver/refinement_resolver.rs
is the culprit
Reduced to;
struct Map<T, U>(T, U);
impl<T, U> Map<T, U> {
fn new() -> Self { loop {} }
fn get(&self, _: &T) -> Option<&U> { loop {} }
}
fn test(x: bool) {
let map = Map::new();
let _ = match x {
true => {
let Some(val) = map.get(&8) else { return };
*val
}
false => return,
};
}
I was editing my code and suddenly started getting the following crash every time I tried to hover over something. I don't know exactly what triggered :S
rust-analyzer version: rust-analyzer version: 0.4.2108-standalone [/home/nlehmann/.vscode/extensions/rust-lang.rust-analyzer-0.4.2108-linux-x64/server/rust-analyzer]
rustc version: rustc 1.82.0-nightly (636d7ff91 2024-08-19)
editor or extension: VSCode
repository link (if public, optional): https://github.com/flux-rs/flux/tree/snapshot-for-ra