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
Support subslice patterns #4917
Comments
I see from the above that type inference is not yet available for subslice patterns and therefore presumably I shouldn't expect the type of fn foo() {
fn bar(_: &[&str]) {}
match vec![""].as_slice() {
[] => {},
[_, xs @ ..] => bar(xs)
}
} Currently this gives a type inference error in the IDE:
If not let me know and I'll raise a bug. |
@fujiapple852 type inference is implemented in #5226 |
Subslice patterns will be stabilized in 1.42. It would be great to support them in the plugin.
Some technical details can be found in rust-lang/rust#67712
The text was updated successfully, but these errors were encountered: