diff options
author | Florian Diebold <[email protected]> | 2021-05-23 15:59:23 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-05-23 17:24:21 +0100 |
commit | 4a6cdd776d403bacce0a5471d77e8c76695c5bc5 (patch) | |
tree | 63f29d9de92697b522c6cc274324764c31ef904f /crates/ide_db/src | |
parent | 96e5412f881608d703df129ed87f3488ad39a9e1 (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.rs | 18 |
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] |
192 | fn test_fn_signature_for_generic_method() { | ||
193 | check( | ||
194 | r#" | ||
195 | struct S<T>(T); | ||
196 | impl<T> S<T> { | ||
197 | fn foo(&self, x: T) {} | ||
198 | } | ||
199 | |||
200 | fn main() { S(1u32).foo($0); } | ||
201 | "#, | ||
202 | expect![[r#" | ||
203 | fn foo(&self, x: u32) | ||
204 | (<x: u32>) | ||
205 | "#]], | ||
206 | ); | ||
207 | } | ||
208 | |||
209 | #[test] | ||
192 | fn test_fn_signature_for_method_with_arg_as_assoc_fn() { | 210 | fn test_fn_signature_for_method_with_arg_as_assoc_fn() { |
193 | check( | 211 | check( |
194 | r#" | 212 | r#" |