You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a regular cargo library crate. If I edit files in src/*.rs I can do racer completion of the current crate fine. When editing files in tests/*.rs or benches/*.rs, completion is not available for the current crate (the library crate). Other external crates complete fine in the test source files.
The text was updated successfully, but these errors were encountered:
@bluss thanks for the issue. If I understand correctly, a test case for this could be:
mycrate/Cargo.toml
[package]
name = "mycrate"
version = "0.1.0"
authors = ["Phil Dawes <[email protected]>"]
mycrate/src/lib.rs
pub fn myfn() {}
mycrate/tests/footest.rs
extern crate mycrate;
mycrate:: <--- complete here should offer 'myfn'
The issue is that racer doesn't locate the lib.rs as being the root module for 'mycrate'. I suspect it should locate the Cargo.toml and notice that the name="mycrate" matches, and then look for src/lib.rs?
Is there a better way?
Does anybody fancy having a go at implementing this?
(my spare time is currently going on racer using rustc for better completions, so will probably not get to this super soon, but am happy to help anybody else that wants to try)
I have a regular cargo library crate. If I edit files in
src/*.rs
I can do racer completion of the current crate fine. When editing files intests/*.rs
orbenches/*.rs
, completion is not available for the current crate (the library crate). Other external crates complete fine in the test source files.The text was updated successfully, but these errors were encountered: