From 3969c7c85373554fcd80aee359cd0def14f7a528 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 19 Dec 2019 12:45:00 +0200 Subject: Ensure hover shows full type declaration --- crates/ra_ide/src/hover.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'crates/ra_ide/src/hover.rs') diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index 51e320128..7d2f160e7 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs @@ -424,6 +424,23 @@ mod tests { ); } + #[test] + fn hover_default_generic_type() { + check_hover_result( + r#" +//- /main.rs +struct Test { + k: K, + t: T, +} + +fn main() { + let zz<|> = Test { t: 23, k: 33 }; +}"#, + &["Test"], + ); + } + #[test] fn hover_some() { let (analysis, position) = single_file_with_position( -- cgit v1.2.3