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:
bors[bot] 2021-03-01 14:50:58 +00:00 committed by GitHub
commit f3139d46b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 2 deletions

View file

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