Resolve associated types with type anchors
This commit is contained in:
@@ -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
|
||||
```
|
||||
"#]],
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user