Fix lowering trailing self paths in UseTrees

This commit is contained in:
Lukas Wirth 2021-02-24 23:37:08 +01:00
parent aa38fa1c72
commit ca7cd41a48
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
"#]],
);
}
}