diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_dot.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_dot.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index f54a02d1d..18b2d68d5 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs | |||
@@ -184,4 +184,26 @@ mod tests { | |||
184 | ", | 184 | ", |
185 | ); | 185 | ); |
186 | } | 186 | } |
187 | |||
188 | #[test] | ||
189 | fn test_tuple_field_inference() { | ||
190 | check_ref_completion( | ||
191 | "tuple_field_inference", | ||
192 | r" | ||
193 | pub struct S; | ||
194 | impl S { | ||
195 | pub fn blah(&self) {} | ||
196 | } | ||
197 | |||
198 | struct T(S); | ||
199 | |||
200 | impl T { | ||
201 | fn foo(&self) { | ||
202 | // FIXME: This doesn't work without the trailing `a` as `0.` is a float | ||
203 | self.0.a<|> | ||
204 | } | ||
205 | } | ||
206 | ", | ||
207 | ); | ||
208 | } | ||
187 | } | 209 | } |