-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Types not inferred for some arguments in function call hint e.g. Option<_> #5843
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
Comments
Do you have the |
Yep:
|
This does look like rust-analyzer can't find the standard library. If you do something like fn main() {
let x = Some(1);
x.
} do you get completions? I'd guess not. Do you have |
Fixed: https://i.imgur.com/4TyFbdI.png So the issue was I had some old settings from RLS, that were interfering. So I just removed the setting for Strangely |
But for future reference, how can I check the rust-analyzer logs in cases like this? |
See #5586. I'm not sure where the logs show up in vim, Code has a tool window for them. |
Thanks! I'll close this now. |
Hi,
See this example: https://i.imgur.com/ISVhf2B.png
This is with rust-analyzer built from the master branch of this repo, and using coc-rust-analyzer in neovim.
The full function signature is:
defined in the same source file.
Where Result there is
anyhow::Result
It fails to show the types for both
Option<_>
cases.I'd be happy to contribute but I'm not sure where to start, even for just getting debug info when using coc and neovim on Linux.
Looking at the code, it seems the relevant part might be the lowering to LSP types in
hir_ty/src/lower.rs
.The text was updated successfully, but these errors were encountered: