diff options
Diffstat (limited to 'crates/assists/src/handlers/fill_match_arms.rs')
-rw-r--r-- | crates/assists/src/handlers/fill_match_arms.rs | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/crates/assists/src/handlers/fill_match_arms.rs b/crates/assists/src/handlers/fill_match_arms.rs index f9a62b9fa..da47187e4 100644 --- a/crates/assists/src/handlers/fill_match_arms.rs +++ b/crates/assists/src/handlers/fill_match_arms.rs | |||
@@ -21,7 +21,7 @@ use crate::{ | |||
21 | // | 21 | // |
22 | // fn handle(action: Action) { | 22 | // fn handle(action: Action) { |
23 | // match action { | 23 | // match action { |
24 | // <|> | 24 | // $0 |
25 | // } | 25 | // } |
26 | // } | 26 | // } |
27 | // ``` | 27 | // ``` |
@@ -231,7 +231,7 @@ mod tests { | |||
231 | Cs(i32, Option<i32>), | 231 | Cs(i32, Option<i32>), |
232 | } | 232 | } |
233 | fn main() { | 233 | fn main() { |
234 | match A::As<|> { | 234 | match A::As$0 { |
235 | A::As, | 235 | A::As, |
236 | A::Bs{x,y:Some(_)} => {} | 236 | A::Bs{x,y:Some(_)} => {} |
237 | A::Cs(_, Some(_)) => {} | 237 | A::Cs(_, Some(_)) => {} |
@@ -249,7 +249,7 @@ mod tests { | |||
249 | fill_match_arms, | 249 | fill_match_arms, |
250 | r#" | 250 | r#" |
251 | fn main() { | 251 | fn main() { |
252 | match (0, false)<|> { | 252 | match (0, false)$0 { |
253 | } | 253 | } |
254 | } | 254 | } |
255 | "#, | 255 | "#, |
@@ -267,7 +267,7 @@ mod tests { | |||
267 | Cs(i32, Option<i32>), | 267 | Cs(i32, Option<i32>), |
268 | } | 268 | } |
269 | fn main() { | 269 | fn main() { |
270 | match A::As<|> { | 270 | match A::As$0 { |
271 | A::Bs { x, y: Some(_) } => {} | 271 | A::Bs { x, y: Some(_) } => {} |
272 | A::Cs(_, Some(_)) => {} | 272 | A::Cs(_, Some(_)) => {} |
273 | } | 273 | } |
@@ -297,7 +297,7 @@ mod tests { | |||
297 | r#" | 297 | r#" |
298 | enum A { As, Bs, Cs(Option<i32>) } | 298 | enum A { As, Bs, Cs(Option<i32>) } |
299 | fn main() { | 299 | fn main() { |
300 | match A::As<|> { | 300 | match A::As$0 { |
301 | A::Cs(_) | A::Bs => {} | 301 | A::Cs(_) | A::Bs => {} |
302 | } | 302 | } |
303 | } | 303 | } |
@@ -322,7 +322,7 @@ fn main() { | |||
322 | enum A { As, Bs, Cs, Ds(String), Es(B) } | 322 | enum A { As, Bs, Cs, Ds(String), Es(B) } |
323 | enum B { Xs, Ys } | 323 | enum B { Xs, Ys } |
324 | fn main() { | 324 | fn main() { |
325 | match A::As<|> { | 325 | match A::As$0 { |
326 | A::Bs if 0 < 1 => {} | 326 | A::Bs if 0 < 1 => {} |
327 | A::Ds(_value) => { let x = 1; } | 327 | A::Ds(_value) => { let x = 1; } |
328 | A::Es(B::Xs) => (), | 328 | A::Es(B::Xs) => (), |
@@ -352,7 +352,7 @@ fn main() { | |||
352 | r#" | 352 | r#" |
353 | enum A { As, Bs, Cs(Option<i32>) } | 353 | enum A { As, Bs, Cs(Option<i32>) } |
354 | fn main() { | 354 | fn main() { |
355 | match A::As<|> { | 355 | match A::As$0 { |
356 | A::As(_) => {} | 356 | A::As(_) => {} |
357 | a @ A::Bs(_) => {} | 357 | a @ A::Bs(_) => {} |
358 | } | 358 | } |
@@ -380,7 +380,7 @@ enum A { As, Bs, Cs(String), Ds(String, String), Es { x: usize, y: usize } } | |||
380 | 380 | ||
381 | fn main() { | 381 | fn main() { |
382 | let a = A::As; | 382 | let a = A::As; |
383 | match a<|> {} | 383 | match a$0 {} |
384 | } | 384 | } |
385 | "#, | 385 | "#, |
386 | r#" | 386 | r#" |
@@ -411,7 +411,7 @@ fn main() { | |||
411 | fn main() { | 411 | fn main() { |
412 | let a = A::One; | 412 | let a = A::One; |
413 | let b = B::One; | 413 | let b = B::One; |
414 | match (a<|>, b) {} | 414 | match (a$0, b) {} |
415 | } | 415 | } |
416 | "#, | 416 | "#, |
417 | r#" | 417 | r#" |
@@ -443,7 +443,7 @@ fn main() { | |||
443 | fn main() { | 443 | fn main() { |
444 | let a = A::One; | 444 | let a = A::One; |
445 | let b = B::One; | 445 | let b = B::One; |
446 | match (&a<|>, &b) {} | 446 | match (&a$0, &b) {} |
447 | } | 447 | } |
448 | "#, | 448 | "#, |
449 | r#" | 449 | r#" |
@@ -475,7 +475,7 @@ fn main() { | |||
475 | fn main() { | 475 | fn main() { |
476 | let a = A::One; | 476 | let a = A::One; |
477 | let b = B::One; | 477 | let b = B::One; |
478 | match (a<|>, b) { | 478 | match (a$0, b) { |
479 | (A::Two, B::One) => {} | 479 | (A::Two, B::One) => {} |
480 | } | 480 | } |
481 | } | 481 | } |
@@ -494,7 +494,7 @@ fn main() { | |||
494 | fn main() { | 494 | fn main() { |
495 | let a = A::One; | 495 | let a = A::One; |
496 | let b = B::One; | 496 | let b = B::One; |
497 | match (a<|>, b) { | 497 | match (a$0, b) { |
498 | (A::Two, B::One) => {} | 498 | (A::Two, B::One) => {} |
499 | (A::One, B::One) => {} | 499 | (A::One, B::One) => {} |
500 | (A::One, B::Two) => {} | 500 | (A::One, B::Two) => {} |
@@ -517,7 +517,7 @@ fn main() { | |||
517 | 517 | ||
518 | fn main() { | 518 | fn main() { |
519 | let a = A::One; | 519 | let a = A::One; |
520 | match (a<|>, ) { | 520 | match (a$0, ) { |
521 | } | 521 | } |
522 | } | 522 | } |
523 | "#, | 523 | "#, |
@@ -532,7 +532,7 @@ fn main() { | |||
532 | enum A { As } | 532 | enum A { As } |
533 | 533 | ||
534 | fn foo(a: &A) { | 534 | fn foo(a: &A) { |
535 | match a<|> { | 535 | match a$0 { |
536 | } | 536 | } |
537 | } | 537 | } |
538 | "#, | 538 | "#, |
@@ -555,7 +555,7 @@ fn main() { | |||
555 | } | 555 | } |
556 | 556 | ||
557 | fn foo(a: &mut A) { | 557 | fn foo(a: &mut A) { |
558 | match a<|> { | 558 | match a$0 { |
559 | } | 559 | } |
560 | } | 560 | } |
561 | "#, | 561 | "#, |
@@ -581,7 +581,7 @@ fn main() { | |||
581 | enum E { X, Y } | 581 | enum E { X, Y } |
582 | 582 | ||
583 | fn main() { | 583 | fn main() { |
584 | match E::X<|> {} | 584 | match E::X$0 {} |
585 | } | 585 | } |
586 | "#, | 586 | "#, |
587 | "match E::X {}", | 587 | "match E::X {}", |
@@ -597,7 +597,7 @@ fn main() { | |||
597 | 597 | ||
598 | fn main() { | 598 | fn main() { |
599 | match E::X { | 599 | match E::X { |
600 | <|>_ => {} | 600 | $0_ => {} |
601 | } | 601 | } |
602 | } | 602 | } |
603 | "#, | 603 | "#, |
@@ -624,7 +624,7 @@ fn main() { | |||
624 | 624 | ||
625 | fn main() { | 625 | fn main() { |
626 | match X { | 626 | match X { |
627 | <|> | 627 | $0 |
628 | } | 628 | } |
629 | } | 629 | } |
630 | "#, | 630 | "#, |
@@ -650,7 +650,7 @@ fn main() { | |||
650 | enum A { One, Two } | 650 | enum A { One, Two } |
651 | fn foo(a: A) { | 651 | fn foo(a: A) { |
652 | match a { | 652 | match a { |
653 | // foo bar baz<|> | 653 | // foo bar baz$0 |
654 | A::One => {} | 654 | A::One => {} |
655 | // This is where the rest should be | 655 | // This is where the rest should be |
656 | } | 656 | } |
@@ -678,7 +678,7 @@ fn main() { | |||
678 | enum A { One, Two } | 678 | enum A { One, Two } |
679 | fn foo(a: A) { | 679 | fn foo(a: A) { |
680 | match a { | 680 | match a { |
681 | // foo bar baz<|> | 681 | // foo bar baz$0 |
682 | } | 682 | } |
683 | } | 683 | } |
684 | "#, | 684 | "#, |
@@ -702,7 +702,7 @@ fn main() { | |||
702 | r#" | 702 | r#" |
703 | enum A { One, Two, } | 703 | enum A { One, Two, } |
704 | fn foo(a: A) { | 704 | fn foo(a: A) { |
705 | match a<|> { | 705 | match a$0 { |
706 | _ => (), | 706 | _ => (), |
707 | } | 707 | } |
708 | } | 708 | } |
@@ -724,7 +724,7 @@ fn main() { | |||
724 | mark::check!(option_order); | 724 | mark::check!(option_order); |
725 | let before = r#" | 725 | let before = r#" |
726 | fn foo(opt: Option<i32>) { | 726 | fn foo(opt: Option<i32>) { |
727 | match opt<|> { | 727 | match opt$0 { |
728 | } | 728 | } |
729 | } | 729 | } |
730 | "#; | 730 | "#; |