-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Confusing Error Utilizing let_chains
#90722
Labels
C-bug
Category: This is a bug.
F-let_chains
`#![feature(let_chains)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Here's a simplified example (Playground): #![feature(let_chains)]
fn main() {
let x = Some(vec!["test"]);
if let Some(v) = x && v.is_empty() {
println!("x == Some([])");
}
} Let's see whether labeling via rustbot works... @rustbot label: +C-bug +F-let_chains +T-compiler |
rustbot
added
C-bug
Category: This is a bug.
F-let_chains
`#![feature(let_chains)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Jan 1, 2022
This is similar to #92145. |
This issue can be closed |
Issue Closed with the merge of #88642. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
F-let_chains
`#![feature(let_chains)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
rustc --version --verbose
:Code:
Error Output:
Is it me, or is the error being a bit confusing, that shouldn't
fields
be already initialized due to theif let
, being only assigned to if the value is indeedSelectScope::Fields(<field vector>)
(or am I misunderstanding things)? Thanks.The text was updated successfully, but these errors were encountered: