racer-rust / racer

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

complete enum constructors #418

Open c-cube opened 8 years ago

c-cube commented 8 years ago

I have the impression racer does not complete constructor names. For instance, racer complete core::option::Opt finds the type Option correctly, but racer complete core::option::Option::Som does not find the constructor Some (nor does racer complete Option::Som in a file in which option is implicitely in scope).

phildawes commented 8 years ago

Doing an Option::Som completion in an editor works. I'm not sure why command line doesn't E.g. /tmp/file.rs

fn main() {
    ::std::option::Option::Som
}
% racer complete 2 30 /tmp/file.rs 
PREFIX 27,30,Som
MATCH Some,173,4,/usr/local/src/rust/src/libcore/option.rs,EnumVariant,Some(T)
END