diff options
| author | mrBliss <dewinant@gmail.com> | 2015-12-01 18:26:00 +0100 |
|---|---|---|
| committer | mrBliss <dewinant@gmail.com> | 2015-12-01 18:26:00 +0100 |
| commit | a33b684a027b8f5efb1e197d7f3e294d2f271f26 (patch) | |
| tree | 32209a22db2e17efd48f89324c17a249dc2fcbe6 /rust-mode-tests.el | |
| parent | 0601540d43b901b0ad0ec62363a143cd3a054364 (diff) | |
| download | rust-mode-a33b684a027b8f5efb1e197d7f3e294d2f271f26.tar.gz | |
Fix #103: comment indentation after struct members
Correctly indent comments that come after struct members that do not
have a trailing comma.
Before:
struct A {
x: u8
// TOO FAR
}
After:
struct A {
x: u8
// CORRECT
}
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index e621f82..eb13128 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -600,6 +600,24 @@ fn foo() { " )) +;; This is a test for #103: a comment after the last struct member that does +;; not have a trailing comma. The comment used to be indented one stop too +;; far. +(ert-deftest indent-comment-after-last-struct-member () + (test-indent + " +struct A { + x: u8 + // comment +} + +struct A { + x: u8 + /* comment */ +} +" + )) + (setq rust-test-motion-string " fn fn1(arg: int) -> bool { |
