Skip to content

Commit 3995d33

Browse files
committed
Add regression test for PR #52.
Thanks again to @GBGamer !
1 parent 493cc99 commit 3995d33

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

rust-mode-tests.el

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,32 @@ fn baz( a:int, // should work with a comment here
394394
{ }
395395
"))
396396

397+
(ert-deftest indent-open-after-arrow ()
398+
(test-indent
399+
"
400+
// Indent function body only one level after `-> {`
401+
fn foo1(a:int, b:char) -> int {
402+
let body;
403+
}
404+
405+
fn foo2(a:int,
406+
b:char) -> int {
407+
let body;
408+
}
409+
410+
fn foo3(a:int,
411+
b:char)
412+
-> int {
413+
let body;
414+
}
415+
416+
fn foo4(a:int,
417+
b:char)
418+
-> int where int:A {
419+
let body;
420+
}
421+
"))
422+
397423
(ert-deftest indent-square-bracket-alignment ()
398424
(test-indent
399425
"

0 commit comments

Comments
 (0)