#If and while let chain causing rust-analyzer to complain about the feature being unstable

5 messages · Page 1 of 1 (latest)

odd python
#
while let Some(peek_ch) = chars.peek() && peek_ch.is_whitespace() {
    chars.next();
}

Rust-analyzer is complaining with

`let` expressions in this position are unstable
see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information```

Aren't let and while let chains stabilized? 

When I run `cargo --version` I get `cargo 1.66.0 (d65d197ad 2022-11-15)`
#

Also, followup question: How do I know what unstable feature to enable to allow this?

thin sparrow
#

let chains are not stabilized; they nearly did but the stabilization was reverted due to bugs found late

thin sparrow
#
    = help: add `#![feature(let_chains)]` to the crate attributes to enable