mod submod {
mod lib {
pub fn foo() {}
}
pub mod app {
use crate::submod::lib as crate_lib; // broken
use super::lib as mod_lib; // ok
pub fn bar() {
crate_lib::foo(); // broken; does not complete (line 11)
mod_lib::foo(); // ok (line 12)
}
}
}
fn main() {
submod::app::bar();
}
The foo() symbol is not found when referred by the crate::submod::lib path. Using a relative super::lib path is ok.
$ racer complete 12 22 main.rs
PREFIX 288,289,f
MATCH foo,3,15,main.rs,Function,pub fn foo()
END
$ racer complete 11 24 main.rs
PREFIX 229,230,f
END
$ racer --version
racer 2.1.45
In
The
foo()
symbol is not found when referred by thecrate::submod::lib
path. Using a relativesuper::lib
path is ok.