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

Unable to parse Args #4504

Closed
Matelasse opened this issue May 18, 2020 · 2 comments
Closed

Unable to parse Args #4504

Matelasse opened this issue May 18, 2020 · 2 comments
Labels
A-ty type system / type inference / traits / method resolution

Comments

@Matelasse
Copy link

Given the following line of code:
let arg1 = &args[1].parse::<String>().unwrap();
RA is unable to specify a correct inlay type hint for arg1.
RA thinks arg1 is of type &{unknown} and no helpful intellisense is being provided for it, even though it's easy to tell that arg1 is String

@Matelasse
Copy link
Author

@matklad Sorry for tagging you, but do you know if this is expected? In hindsight, looks like this should already be addressed in the codebase. I'd appreciate insights on where to look for the fix

@flodiebold flodiebold added the A-ty type system / type inference / traits / method resolution label May 20, 2020
@flodiebold
Copy link
Member

This is a duplicate of #2534. Sadly, it's not at all easy to tell the type of args[1] (for details, see that issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution
Projects
None yet
Development

No branches or pull requests

2 participants