8000 Does not look into accessible private submodule · Issue #1164 · racer-rust/racer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Does not look into accessible private submodule #1164
Open
@ensc

Description

@ensc

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0