Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/hover/tests.rs')
| -rw-r--r-- | crates/ide/src/hover/tests.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs index 516e32ef91..18f0aeba29 100644 --- a/crates/ide/src/hover/tests.rs +++ b/crates/ide/src/hover/tests.rs @@ -8602,3 +8602,31 @@ fn test() { "#]], ); } + +#[test] +fn issue_17871() { + check( + r#" +trait T { + fn f<A>(); +} + +struct S {} +impl T for S { + fn f<A>() {} +} + +fn main() { + let x$0 = S::f::<i32>; +} +"#, + expect![[r#" + *x* + + ```rust + // size = 0, align = 1 + let x: fn f<S, i32>() + ``` + "#]], + ); +} |