@@ -451,7 +451,8 @@ fn foo4(a:i32,
451
451
" ))
452
452
453
453
(ert-deftest indent-body-after-where ()
454
- (test-indent
454
+ (let ((rust-indent-where-clause t ))
455
+ (test-indent
455
456
"
456
457
fn foo1(a: A, b: B) -> A
457
458
where A: Clone + Default, B: Eq {
@@ -469,10 +470,11 @@ fn foo2(a: A, b: B) -> A
469
470
bar: 3
470
471
}
471
472
}
472
- " ))
473
+ " )))
473
474
474
475
(ert-deftest indent-align-where-clauses-style1a ()
475
- (test-indent
476
+ (let ((rust-indent-where-clause t ))
477
+ (test-indent
476
478
"
477
479
fn foo1a(a: A, b: B, c: C) -> D
478
480
where A: Clone + Default,
@@ -484,10 +486,11 @@ fn foo1a(a: A, b: B, c: C) -> D
484
486
bar: 3
485
487
}
486
488
}
487
- " ))
489
+ " )))
488
490
489
491
(ert-deftest indent-align-where-clauses-style1b ()
490
- (test-indent
492
+ (let ((rust-indent-where-clause t ))
493
+ (test-indent
491
494
"
492
495
fn foo1b(a: A, b: B, c: C) -> D
493
496
where A: Clone + Default,
@@ -500,7 +503,7 @@ fn foo1b(a: A, b: B, c: C) -> D
500
503
bar: 3
501
504
}
502
505
}
503
- " ))
506
+ " )))
504
507
505
508
(ert-deftest indent-align-where-clauses-style2a ()
506
509
(test-indent
@@ -596,7 +599,8 @@ where A: Clone + Default,
596
599
" )))
597
600
598
601
(ert-deftest indent-align-where-clauses-impl-example ()
599
- (test-indent
602
+ (let ((rust-indent-where-clause t ))
603
+ (test-indent
600
604
"
601
605
impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V, S>
602
606
where K: Eq + Hash + Borrow<Q>,
@@ -608,18 +612,19 @@ impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V, S>
608
612
bar: 3
609
613
}
610
614
}
611
- " ))
615
+ " )))
612
616
613
617
(ert-deftest indent-align-where-clauses-first-line ()
614
- (test-indent
618
+ (let ((rust-indent-where-clause t ))
619
+ (test-indent
615
620
" fn foo1(a: A, b: B) -> A
616
621
where A: Clone + Default, B: Eq {
617
622
let body;
618
623
Foo {
619
624
bar: 3
620
625
}
621
626
}
622
- " ))
627
+ " )))
623
628
624
629
(ert-deftest indent-align-where-in-comment1 ()
625
630
(test-indent
@@ -632,17 +637,19 @@ pub struct Region { // <-- this should be flush with left margin!
632
637
" ))
633
638
634
639
(ert-deftest indent-align-where-in-comment2 ()
635
- (test-indent
640
+ (let ((rust-indent-where-clause t ))
641
+ (test-indent
636
642
" fn foo<F,G>(f:F, g:G)
637
643
where F:Send,
638
644
// where
639
645
G:Sized
640
646
{
641
647
let body;
642
648
}
643
- " ))
649
+ " )))
644
650
645
651
(ert-deftest indent-align-where-in-comment3 ()
652
+ (let ((rust-indent-where-clause t ))
646
653
(test-indent
647
654
" fn foo<F,G>(f:F, g:G)
648
655
where F:Send,
@@ -651,7 +658,7 @@ pub struct Region { // <-- this should be flush with left margin!
651
658
{
652
659
let body;
653
660
}
654
- " ))
661
+ " )))
655
662
656
663
(ert-deftest indent-square-bracket-alignment ()
657
664
(test-indent
0 commit comments