mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Fix completion and hover for module and function of same name
This commit is contained in:
parent
cffa70be01
commit
001a86dc03
4 changed files with 102 additions and 2 deletions
|
@ -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"],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue