From f407ac2be332e474b25a10aaf3be145c85f4b60b Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Thu, 19 Dec 2019 16:47:09 +0200 Subject: Omit default types for hover pop-ups --- crates/ra_ide/src/hover.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index 7d2f160e7..a227bf546 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs @@ -250,7 +250,7 @@ pub(crate) fn type_of(db: &RootDatabase, frange: FileRange) -> Option { } else { return None; }; - Some(ty.display(db).to_string()) + Some(ty.display_truncated(db, None).to_string()) } #[cfg(test)] @@ -425,7 +425,7 @@ mod tests { } #[test] - fn hover_default_generic_type() { + fn hover_omits_default_generic_types() { check_hover_result( r#" //- /main.rs @@ -437,7 +437,7 @@ struct Test { fn main() { let zz<|> = Test { t: 23, k: 33 }; }"#, - &["Test"], + &["Test"], ); } -- cgit v1.2.3