aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api_light/src/typing.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api_light/src/typing.rs')
-rw-r--r--crates/ra_ide_api_light/src/typing.rs40
1 files changed, 40 insertions, 0 deletions
diff --git a/crates/ra_ide_api_light/src/typing.rs b/crates/ra_ide_api_light/src/typing.rs
index 5ff2b7c1f..861027b9f 100644
--- a/crates/ra_ide_api_light/src/typing.rs
+++ b/crates/ra_ide_api_light/src/typing.rs
@@ -296,6 +296,46 @@ fn foo() {
296 } 296 }
297 297
298 #[test] 298 #[test]
299 fn indents_middle_of_chain_call() {
300 type_dot(
301 r"
302 fn source_impl() {
303 let var = enum_defvariant_list().unwrap()
304 <|>
305 .nth(92)
306 .unwrap();
307 }
308 ",
309 r"
310 fn source_impl() {
311 let var = enum_defvariant_list().unwrap()
312 .
313 .nth(92)
314 .unwrap();
315 }
316 ",
317 );
318 type_dot(
319 r"
320 fn source_impl() {
321 let var = enum_defvariant_list().unwrap()
322 <|>
323 .nth(92)
324 .unwrap();
325 }
326 ",
327 r"
328 fn source_impl() {
329 let var = enum_defvariant_list().unwrap()
330 .
331 .nth(92)
332 .unwrap();
333 }
334 ",
335 );
336 }
337
338 #[test]
299 fn dont_indent_freestanding_dot() { 339 fn dont_indent_freestanding_dot() {
300 type_dot( 340 type_dot(
301 r" 341 r"