aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-13 21:28:11 +0100
committerGitHub <[email protected]>2020-08-13 21:28:11 +0100
commite5b17b6ad493d1d4430b451619e53594a2796e5d (patch)
tree3df99a280caea5274d00ff860a4e9f6b16419eb2 /crates/ide
parent3d6fd620e80050d68e6da55aabad2ca780ba2323 (diff)
parent947a27b797cd87d5650477441c9c3c03b6364626 (diff)
Merge #5752
5752: display correctly 'impl Trait<T> + Trait<T>' #4814 r=flodiebold a=bnjjj close #4814 Co-authored-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/ide')
-rw-r--r--crates/ide/src/hover.rs19
1 files changed, 19 insertions, 0 deletions
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
@@ -767,6 +767,25 @@ fn main() {
767 } 767 }
768 768
769 #[test] 769 #[test]
770 fn hover_for_param_with_multiple_traits() {
771 check(
772 r#"trait Deref {
773 type Target: ?Sized;
774 }
775 trait DerefMut {
776 type Target: ?Sized;
777 }
778 fn f(_x<|>: impl Deref<Target=u8> + DerefMut<Target=u8>) {}"#,
779 expect![[r#"
780 *_x*
781 ```rust
782 impl Deref<Target = u8> + DerefMut<Target = u8>
783 ```
784 "#]],
785 )
786 }
787
788 #[test]
770 fn test_hover_infer_associated_method_result() { 789 fn test_hover_infer_associated_method_result() {
771 check( 790 check(
772 r#" 791 r#"