Skip to content
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

Type inference for slice patterns #3387

Merged
merged 4 commits into from
Mar 1, 2020
Merged

Conversation

JoshMcguigan
Copy link
Contributor

Fixes #3043

Notes to reviewer:

  1. This only works if expected is Ty::Apply. I'm not sure of the implications of this.
  2. This only works if the slice pattern only has a prefix. I think this means it doesn't work for subslice patterns, which are currently only available behind a feature flag.

crates/ra_hir_ty/src/infer/pat.rs Outdated Show resolved Hide resolved
@flodiebold
Copy link
Member

bors r+

Thanks!

@flodiebold flodiebold self-requested a review March 1, 2020 22:36
@bors
Copy link
Contributor

bors bot commented Mar 1, 2020

@bors bors bot merged commit b71fc18 into rust-lang:master Mar 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No type inference for slice patterns
2 participants