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
GRAM&ANN&TY: Support if let guard
syntax
#7799
Conversation
if let guard
syntax as experimentalif let guard
syntax as experimental
cb07a6d
to
41b1977
Compare
41b1977
to
99feb54
Compare
99feb54
to
23b4c4e
Compare
if let guard
syntax as experimentalif let guard
syntax
996ce42
to
8d4bdc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to support type inference and name resolution for items from if let
guard.
For example, in the following example
#![feature(if_let_guard)]
enum Foo {
Bar(i32),
Baz
}
fn foo(f: Foo, y: i32) {
match y {
1 if let Foo::Bar(z) = f => { z + y }
_ => 0
};
}
the plugin knows neither the type nor location of z
variable
Don't insist on implementing it in this PR. But probably it's worth converting the original issue into a meta issue for if let guard
feature support and track progress there
src/main/kotlin/org/rust/lang/core/parser/RustParserDefinition.kt
Outdated
Show resolved
Hide resolved
8d4bdc5
to
af3a977
Compare
if let guard
syntaxif let guard
syntax
2ec24e5
to
83a249e
Compare
@Undin fixed. |
83a249e
to
258f693
Compare
258f693
to
d6183c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bors r+
Build succeeded: |
Closes #7794.
changelog: Support if let guard syntax