Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not look into accessible private submodule #1164

Open
ensc opened this issue May 1, 2021 · 0 comments
Open

Does not look into accessible private submodule #1164

ensc opened this issue May 1, 2021 · 0 comments

Comments

@ensc
Copy link

ensc commented May 1, 2021

In

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
@ensc ensc changed the title Does not looks into accessible private submodule Does not look into accessible private submodule May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant