racer-rust / racer

Rust Code Completion utility
MIT License
3.36k stars 278 forks source link

Correctly handle multiple-use #96

Closed porglezomp closed 7 years ago

porglezomp commented 9 years ago

It would be nice if line like std::io::{ would complete the same as std::io:: It would be even nicer if, for instance use std::rc::{Rc, would recommend everything that std::rc:: recommends, except it would omit Rc since it's already being used.

phildawes commented 9 years ago

Hello Proglezomp! I definitely agree. Context based completions is just something I haven't got to with racer yet. This one should be pretty easy though so now that you've asked for it I might try doing this after I've finished if-let statements (which is what I'm doing at the moment). Thanks!

TedDriggs commented 7 years ago

Technically, the following code is valid:

use std::fmt::{Formatter, Formatter as Fmtr};

I have no idea why someone would do this, but since it's allowed I'm reluctant to have rust hide things that have already been imported in the current use statement.

porglezomp commented 7 years ago

I was a little surprised to get this notification, but as far as I can tell the main issue here was resolved a while ago thanks to @yodalee, so I'm happy to have this issue closed.