mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
fix: path display error when start with crate
This commit is contained in:
parent
86ebc36fa3
commit
82ae228d98
2 changed files with 20 additions and 1 deletions
|
@ -962,6 +962,25 @@ fn main() { let foo_test = fo$0o(); }
|
|||
```
|
||||
"#]],
|
||||
);
|
||||
|
||||
// use literal `crate` in path
|
||||
check(r#"
|
||||
pub struct X;
|
||||
|
||||
fn foo() -> crate::X { X }
|
||||
|
||||
fn main() { f$0oo(); }
|
||||
"#, expect![[r#"
|
||||
*foo*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
fn foo() -> crate::X
|
||||
```
|
||||
"#]]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue