Resolve associated types
This commit is contained in:
@@ -3834,4 +3834,46 @@ fn foo() {}
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hover_generic_assoc() {
|
||||
check(
|
||||
r#"
|
||||
fn foo<T: A>() where T::Assoc$0: {}
|
||||
|
||||
trait A {
|
||||
type Assoc;
|
||||
}"#,
|
||||
expect![[r#"
|
||||
*Assoc*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
type Assoc
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
check(
|
||||
r#"
|
||||
trait A where
|
||||
Self::Assoc$0: ,
|
||||
{
|
||||
type Assoc;
|
||||
}"#,
|
||||
expect![[r#"
|
||||
*Assoc*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
type Assoc
|
||||
```
|
||||
"#]],
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user