aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/hover.rs42
1 files changed, 42 insertions, 0 deletions
diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs
index 5f9edb476..8f98056c1 100644
--- a/crates/ide/src/hover.rs
+++ b/crates/ide/src/hover.rs
@@ -3834,4 +3834,46 @@ fn foo() {}
3834 "#]], 3834 "#]],
3835 ); 3835 );
3836 } 3836 }
3837
3838 #[test]
3839 fn hover_generic_assoc() {
3840 check(
3841 r#"
3842fn foo<T: A>() where T::Assoc$0: {}
3843
3844trait A {
3845 type Assoc;
3846}"#,
3847 expect![[r#"
3848 *Assoc*
3849
3850 ```rust
3851 test
3852 ```
3853
3854 ```rust
3855 type Assoc
3856 ```
3857 "#]],
3858 );
3859 check(
3860 r#"
3861trait A where
3862 Self::Assoc$0: ,
3863{
3864 type Assoc;
3865}"#,
3866 expect![[r#"
3867 *Assoc*
3868
3869 ```rust
3870 test
3871 ```
3872
3873 ```rust
3874 type Assoc
3875 ```
3876 "#]],
3877 )
3878 }
3837} 3879}