Resolve associated types

This commit is contained in:
Lukas Wirth 2021-04-01 18:01:18 +02:00
parent 75011bbccb
commit 444f6caaba
4 changed files with 64 additions and 5 deletions

View file

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