aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/hover.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-04-01 20:52:07 +0100
committerLukas Wirth <[email protected]>2021-04-01 20:52:07 +0100
commit9fe10a96069ea0f617ff86049bb50922b5424fae (patch)
treebacb0a041f8bdf04199e9a11f6de4fb5365a761d /crates/ide/src/hover.rs
parent444f6caababc3335b1ed51d08eeedac106fd8077 (diff)
Resolve associated types with type anchors
Diffstat (limited to 'crates/ide/src/hover.rs')
-rw-r--r--crates/ide/src/hover.rs23
1 files changed, 22 insertions, 1 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 8f98056c1..28e2e17dc 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -3858,6 +3858,27 @@ trait A {
3858 ); 3858 );
3859 check( 3859 check(
3860 r#" 3860 r#"
3861fn foo<T: A>() {
3862 let _: <T>::Assoc$0;
3863}
3864
3865trait A {
3866 type Assoc;
3867}"#,
3868 expect![[r#"
3869 *Assoc*
3870
3871 ```rust
3872 test
3873 ```
3874
3875 ```rust
3876 type Assoc
3877 ```
3878 "#]],
3879 );
3880 check(
3881 r#"
3861trait A where 3882trait A where
3862 Self::Assoc$0: , 3883 Self::Assoc$0: ,
3863{ 3884{
@@ -3874,6 +3895,6 @@ trait A where
3874 type Assoc 3895 type Assoc
3875 ``` 3896 ```
3876 "#]], 3897 "#]],
3877 ) 3898 );
3878 } 3899 }
3879} 3900}