Fix completion and hover for module and function of same name

This commit is contained in:
Hasan Ali 2020-05-15 22:23:49 +01:00
parent cffa70be01
commit 001a86dc03
4 changed files with 102 additions and 2 deletions

View file

@ -921,4 +921,21 @@ fn func(foo: i32) { if true { <|>foo; }; }
&["unsafe trait foo"],
);
}
#[test]
fn test_hover_mod_with_same_name_as_function() {
check_hover_result(
"
//- /lib.rs
use self::m<|>y::Bar;
mod my {
pub struct Bar;
}
fn my() {}
",
&["mod my"],
);
}
}