mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Include self in usage search for modules in their definition source
This commit is contained in:
parent
1fa82adfdc
commit
34c28c1bbc
4 changed files with 79 additions and 5 deletions
|
|
@ -934,12 +934,18 @@ mod outer { mod fo$0o; }
|
|||
check(
|
||||
"baz",
|
||||
r#"
|
||||
mod $0foo { pub fn bar() {} }
|
||||
mod $0foo {
|
||||
pub use self::bar as qux;
|
||||
pub fn bar() {}
|
||||
}
|
||||
|
||||
fn main() { foo::bar(); }
|
||||
"#,
|
||||
r#"
|
||||
mod baz { pub fn bar() {} }
|
||||
mod baz {
|
||||
pub use self::bar as qux;
|
||||
pub fn bar() {}
|
||||
}
|
||||
|
||||
fn main() { baz::bar(); }
|
||||
"#,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue