summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-12-03 09:32:38 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-12-03 09:32:38 -0500
commit95d089cbc3a23c0dd23869e716520c31daefdf8f (patch)
tree6ea3ddad982ab9ba19fc1fa10f3c791d7c198d2b /rust-mode-tests.el
parenteaf95af109b2f90441fb4976678b1f058d2c4de8 (diff)
parenta33b684a027b8f5efb1e197d7f3e294d2f271f26 (diff)
downloadrust-mode-95d089cbc3a23c0dd23869e716520c31daefdf8f.tar.gz
Merge pull request #110 from mrBliss/fix-103
Fix #103
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index cc76007..cbfde96 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -771,6 +771,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 {