From 947a27b797cd87d5650477441c9c3c03b6364626 Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Thu, 13 Aug 2020 22:13:34 +0200 Subject: display correctly 'impl Trait + Trait' #4814 Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- crates/ide/src/hover.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'crates/ide') diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index 331aa4db0..300c00edc 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs @@ -766,6 +766,25 @@ fn main() { ) } + #[test] + fn hover_for_param_with_multiple_traits() { + check( + r#"trait Deref { + type Target: ?Sized; + } + trait DerefMut { + type Target: ?Sized; + } + fn f(_x<|>: impl Deref + DerefMut) {}"#, + expect![[r#" + *_x* + ```rust + impl Deref + DerefMut + ``` + "#]], + ) + } + #[test] fn test_hover_infer_associated_method_result() { check( -- cgit v1.2.3