Include self in usage search for modules in their definition source

This commit is contained in:
Lukas Wirth 2021-06-28 16:41:35 +02:00
parent 1fa82adfdc
commit 34c28c1bbc
4 changed files with 79 additions and 5 deletions

View file

@ -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(); }
"#,