Resolve associated types with type anchors

This commit is contained in:
Lukas Wirth 2021-04-01 21:52:07 +02:00
parent 444f6caaba
commit 9fe10a9606
3 changed files with 42 additions and 12 deletions

View file

@ -3841,6 +3841,27 @@ fn foo() {}
r#"
fn foo<T: A>() where T::Assoc$0: {}
trait A {
type Assoc;
}"#,
expect![[r#"
*Assoc*
```rust
test
```
```rust
type Assoc
```
"#]],
);
check(
r#"
fn foo<T: A>() {
let _: <T>::Assoc$0;
}
trait A {
type Assoc;
}"#,
@ -3874,6 +3895,6 @@ trait A where
type Assoc
```
"#]],
)
);
}
}