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.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/crates/ide/src/hover/tests.rs b/crates/ide/src/hover/tests.rs
index 8c9d58671e..d5ec336fc7 100644
--- a/crates/ide/src/hover/tests.rs
+++ b/crates/ide/src/hover/tests.rs
@@ -6698,3 +6698,30 @@ foo!(r"{$0aaaaa}");
"#]],
);
}
+
+#[test]
+fn method_call_without_parens() {
+ check(
+ r#"
+struct S;
+impl S {
+ fn foo<T>(&self, t: T) {}
+}
+
+fn main() {
+ S.foo$0;
+}
+"#,
+ expect![[r#"
+ *foo*
+
+ ```rust
+ test::S
+ ```
+
+ ```rust
+ fn foo<T>(&self, t: T)
+ ```
+ "#]],
+ );
+}