mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 07:37:30 +00:00
Merge #7778
7778: Fix lowering trailing self paths in UseTrees r=Veykril a=Veykril Noticed that hovering over `self` in a use tree like `use foo::bar::{self}` showing documentation and such for the current module instead of `bar`. Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
f3139d46b0
2 changed files with 40 additions and 2 deletions
|
@ -3496,4 +3496,33 @@ mod foo$0;
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_self_in_use() {
|
||||
check(
|
||||
r#"
|
||||
//! This should not appear
|
||||
mod foo {
|
||||
/// But this should appear
|
||||
pub mod bar {}
|
||||
}
|
||||
use foo::bar::{self$0};
|
||||
"#,
|
||||
expect![[r#"
|
||||
*self*
|
||||
|
||||
```rust
|
||||
test::foo
|
||||
```
|
||||
|
||||
```rust
|
||||
pub mod bar
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
But this should appear
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue