mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Resolve associated types with type anchors
This commit is contained in:
parent
444f6caaba
commit
9fe10a9606
3 changed files with 42 additions and 12 deletions
|
@ -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
|
||||
```
|
||||
"#]],
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue