[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 917503b 244/486: Fix failing tests, and add a te
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 917503b 244/486: Fix failing tests, and add a test for the fix. |
Date: |
Sat, 7 Aug 2021 09:25:28 -0400 (EDT) |
branch: elpa/rust-mode
commit 917503bf51d936ee0868a377527ff88a8a7a2ac0
Author: Brian Mastenbrook <brian@mastenbrook.net>
Commit: Brian Mastenbrook <brian@mastenbrook.net>
Fix failing tests, and add a test for the fix.
---
rust-mode-tests.el | 9 +++++++++
rust-mode.el | 7 +++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 2c0431c..de3900c 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -164,6 +164,15 @@ Also, the result should be the same regardless of whether
the code is at the beg
//
// This is the second really really really really really really long
paragraph" 1 89))
+(ert-deftest fill-paragraph-multi-line-style-comment ()
+ (test-fill-paragraph
+ "/* This is a very very very very very very very very long string
+ */"
+ "/* This is a very very very very
+ * very very very very long
+ * string
+ */"))
+
(ert-deftest fill-paragraph-multi-line-style-inner-doc-comment ()
(test-fill-paragraph
"/*! This is a very very very very very very very long string
diff --git a/rust-mode.el b/rust-mode.el
index 273a751..bb4d792 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1058,10 +1058,13 @@ the desired identifiers), but does not match type
annotations \"foo::<\"."
(let ((result
;; Replace /* with same number of spaces
(replace-regexp-in-string
- "\\(?:/\\*+\\)"
+ "\\(?:/\\*+\\)[!*]?"
(lambda (s)
;; We want the * to line up with the first * of the comment start
- (concat (make-string (- (length s) 1) ?\x20) "*"))
+ (concat (make-string (- (length s)
+ (if (or (string-suffix-p "!" s)
+ (string-suffix-p "**" s)) 2 1))
+ ?\x20) "*"))
line-start)))
;; Make sure we've got at least one space at the end
(if (not (= (aref result (- (length result) 1)) ?\x20))
- [nongnu] elpa/rust-mode bfe4056 452/486: Re-implement rust-in-macro for performance, (continued)
- [nongnu] elpa/rust-mode bfe4056 452/486: Re-implement rust-in-macro for performance, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode eaf95af 210/486: Merge pull request #111 from mrBliss/where-indentation, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2540d7e 262/486: Go back to the current line and column after formatting., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 52870b6 203/486: Remove unused require of misc.el, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 95d089c 211/486: Merge pull request #110 from mrBliss/fix-103, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 00e5366 224/486: Merge pull request #122 from kraai/remove-duplicate-keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0601540 205/486: Merge pull request #96 from MicahChalmer/add-licenses, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1492106 232/486: Fix hook args for after-revert-hook, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 2f42da8 228/486: Add rust-promote-module-into-dir, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0914b48 234/486: Merge pull request #133 from kraai/avoid-cl, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 917503b 244/486: Fix failing tests, and add a test for the fix.,
ELPA Syncer <=
- [nongnu] elpa/rust-mode a8a5e14 245/486: Fix for emacs24, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ed0b390 246/486: Merge pull request #148 from bmastenbrook/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b971c6d 247/486: Fix #151, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode abadab0 009/486: Update rust-mode.el with new keywords., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6275e8e 010/486: Add trait to emacs keyword table., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9f21b28 024/486: change to 4-space indents everywhere, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f1b6007 174/486: Merge pull request #71 from birkenfeld/doc-comments, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 07943f0 178/486: Perform syntactic angle bracket matching, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 54e24e6 200/486: Add basic license information, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e3c545e 252/486: imenu: don't add item defs in single-line comments, ELPA Syncer, 2021/08/07