Skip to content

Ensure let-else expression does not end with a } #3462

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

Open
CohenArthur opened this issue Feb 26, 2025 · 1 comment · May be fixed by #3577
Open

Ensure let-else expression does not end with a } #3462

CohenArthur opened this issue Feb 26, 2025 · 1 comment · May be fixed by #3577
Assignees
Labels

Comments

@CohenArthur
Copy link
Member

https://doc.rust-lang.org/reference/statements.html#let-statements

@beamandala
Copy link
Contributor

Hi, I'm interested in working on this issue. I'd like to make sure I understand the issue.

Are we trying to make sure that the expression following = isn't wrapped in curly braces?

For example, is this invalid?

let Some(x) = { Some(10) } else {
    panic!("");
};

@beamandala beamandala linked a pull request Mar 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants