aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-05-23 15:59:23 +0100
committerFlorian Diebold <[email protected]>2021-05-23 17:24:21 +0100
commit4a6cdd776d403bacce0a5471d77e8c76695c5bc5 (patch)
tree63f29d9de92697b522c6cc274324764c31ef904f /crates/ide_db/src
parent96e5412f881608d703df129ed87f3488ad39a9e1 (diff)
Record method call substs and use them in call info
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r--crates/ide_db/src/call_info/tests.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ide_db/src/call_info/tests.rs b/crates/ide_db/src/call_info/tests.rs
index be1cc12de..1aeda08e5 100644
--- a/crates/ide_db/src/call_info/tests.rs
+++ b/crates/ide_db/src/call_info/tests.rs
@@ -189,6 +189,24 @@ fn main() { S.foo($0); }
189} 189}
190 190
191#[test] 191#[test]
192fn test_fn_signature_for_generic_method() {
193 check(
194 r#"
195struct S<T>(T);
196impl<T> S<T> {
197 fn foo(&self, x: T) {}
198}
199
200fn main() { S(1u32).foo($0); }
201"#,
202 expect![[r#"
203 fn foo(&self, x: u32)
204 (<x: u32>)
205 "#]],
206 );
207}
208
209#[test]
192fn test_fn_signature_for_method_with_arg_as_assoc_fn() { 210fn test_fn_signature_for_method_with_arg_as_assoc_fn() {
193 check( 211 check(
194 r#" 212 r#"