mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix super
path wrong display
This commit is contained in:
parent
880af425d4
commit
87436a08fa
2 changed files with 29 additions and 5 deletions
|
@ -963,7 +963,7 @@ fn main() { let foo_test = fo$0o(); }
|
|||
"#]],
|
||||
);
|
||||
|
||||
// use literal `crate` in path
|
||||
// Use literal `crate` in path
|
||||
check(
|
||||
r#"
|
||||
pub struct X;
|
||||
|
@ -984,6 +984,28 @@ fn main() { f$0oo(); }
|
|||
```
|
||||
"#]],
|
||||
);
|
||||
|
||||
// Check `super` in path
|
||||
check(
|
||||
r#"
|
||||
pub struct X;
|
||||
|
||||
mod m { pub fn foo() -> super::X { super::X } }
|
||||
|
||||
fn main() { m::f$0oo(); }
|
||||
"#,
|
||||
expect![[r#"
|
||||
*foo*
|
||||
|
||||
```rust
|
||||
test::m
|
||||
```
|
||||
|
||||
```rust
|
||||
pub fn foo() -> super::X
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue