You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubfnfoo(a:&[u8],b:bool) -> bool{match b {trueiflet[1,2,3, ..] = a => true,
_ => false,}}
I expected to see this happen:
The compilation fails and error points out that if-let guard is not implemented
and being tracked at #51114
Instead, this happened:
The error points to let_chains feature, which is wrong and adding that feature gate
doesn't make the code compile.
error[E0658]: `let` expressions in this position are experimental
--> <source>:3:17
|
3 | true if let[1,2,3, ..] = a => true,
| ^^^^^^^^^^^^^^^^^^^^^
|
= note:see issue #53667 <https://github.com/rust-lang/rust/issues/53667> for more information
= help: add `#![feature(let_chains)]` to the crate attributes to enable
Activity
[-]if-let arm point to let_chains issue[/-][+]if-let guard point to let_chains issue[/+]Auto merge of rust-lang#74566 - lzutao:guard, r=petrochenkov