racer-rust / racer

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

Does not find symbols in external implementations #1165

Open ensc opened 3 years ago

ensc commented 3 years ago

In

pub mod lib {
    pub struct Foo;

    impl Foo {
    pub fn some_func() {}
    }
}

pub mod app {
    impl crate::lib::Foo {
    pub fn other_func() {}
    }
}

fn main() {
    lib::Foo::some_func();  // ok
    lib::Foo::other_func(); // broken
}

the some_func() symbol is found by racer while other_func not:

$ racer --version
racer 2.1.45

$ racer complete 16 15 main.rs 
PREFIX 182,183,s
MATCH some_func,5,8,main.rs,Function,pub fn some_func()
END

$ racer complete 17 15 main.rs 
PREFIX 215,216,o
END