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

Feature Request: Determine Inferred Types Operation #304

Open
bruno-medeiros opened this issue Jul 13, 2015 · 5 comments
Open

Feature Request: Determine Inferred Types Operation #304

bruno-medeiros opened this issue Jul 13, 2015 · 5 comments

Comments

@bruno-medeiros
Copy link

Feature Request: Rust operation to infer and display the type of a variable or expression. Example
let foo = "blah";
Run this racer operation with source location at foo, or "blah", Racer displays the name of the inferred type: &str

@HybridEidolon
Copy link
Contributor

If I'm not mistaken, racer doesn't infer types except in the simplest cases (types evaluated from macros or pattern matching don't work, for example), so that needs to be improved in order to make this happen.

@porglezomp
Copy link

Is there a way to ask the rust compiler or one of its component libraries to do the type inference for us, that could be leveraged by racer?

@phildawes
Copy link
Collaborator

It is the goal to eventually use rustc for type inference, and the rust
tools team are working in the direction of making rustc more amenable for
tools use, but it is a way off.
I've been experimenting with using rustc for type inference, but it is an
uphill battle with the current rustc design

On Wed, Aug 26, 2015 at 5:21 AM, Caleb Jones [email protected]
wrote:

Is there a way to ask the rust compiler or one of its component libraries
to do the type inference for us, that could be leveraged by racer?


Reply to this email directly or view it on GitHub
#304 (comment).

@runcom
Copy link

runcom commented Jun 11, 2017

any update on this?

@TedDriggs
Copy link
Contributor

TedDriggs commented Jun 12, 2017

Would #728 address the specific request here for completions on &'static str literal values? Also, #730 adds a get-type command which should help for some of these cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants