mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Fix lowering trailing self paths in UseTrees
This commit is contained in:
parent
aa38fa1c72
commit
ca7cd41a48
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