I am using racer.exe tool in Windows from inside a cargo project root directory (the dir where cargo.toml is found) to find type definitions by passing the linenum, charnum and src/file1.rs file, that's the cursor pos of the symbol inside file1.rs. My symbol is a type which is defined inside another .rs file (e.g. file2.rs) located in the same cargo src directory. Racer is failing to find a match. However, if the type is defined in the same .rs file, racer is able to find it. Symbols found in Rust standard libs or in downloaded crates are also found. How can I get the racer tool under Windows to find the definition of a type which is found in a separate .rs file inside the same cargo project src directory?
I am using racer version 2.0.5 under Windows 7 ultimate SP1.
Cargo: cargo 0.15.0-nightly (298a012 2016-12-20)
rustc 1.14.0
I have a cargo lib project with many .rs files under src dir. I am then running racer.exe from the command line passing the find-definition subcommand. Current directory is my cargo project's root which contains my toml file.
I need to know if you use file2 in file1 (via use).
I need to know what exactly type looks like.
Please mention that racer doesn't support any form of macros. https://github.com/phildawes/racer/issues/337
Actually, I have created many types, each type in its own .rs file. I have included all my .rs files in my lib.rs file, using the include!() macro. So, no I am not using "use". Should I? How? Would it solve my problem?
My lib.rs doesn't contain any code, just a list of includes. Could you please suggest something else that would solve my racer issue? How should I use use instead of include to allow me to use file1 types in file2 and vice versa?