File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2414,6 +2414,14 @@ fn main() {
2414
2414
" /* " font-lock-comment-delimiter-face
2415
2415
" no-op */" font-lock-comment-face )))
2416
2416
2417
+ (ert-deftest font-lock-fontify-angle-brackets ()
2418
+ " Test that angle bracket fontify"
2419
+ (should (equal (rust-test-fontify-string " <>" ) " <>" ))
2420
+ (should (equal (rust-test-fontify-string " <foo>" ) " <foo>" ))
2421
+ (should (equal (rust-test-fontify-string " <<>>" ) " <<>>" ))
2422
+ (should (equal (rust-test-fontify-string " <>>" ) " <>>" ))
2423
+ (should (equal (rust-test-fontify-string " <<>" ) " <<>" )))
2424
+
2417
2425
(ert-deftest rust-test-basic-paren-matching ()
2418
2426
(rust-test-matching-parens
2419
2427
"
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ Like `looking-back' but for fixed strings rather than regexps (so that it's not
80
80
81
81
(defun rust-looking-back-macro ()
82
82
" Non-nil if looking back at an ident followed by a !"
83
- (save-excursion (backward-char ) (and (= ?! (char-after )) (rust-looking-back-ident))))
83
+ (if (> (- (point ) (point-min )) 1 )
84
+ (save-excursion (backward-char ) (and (= ?! (char-after )) (rust-looking-back-ident)))))
84
85
85
86
; ; Syntax definitions and helpers
86
87
(defvar rust-mode-syntax-table
@@ -1604,7 +1605,7 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
1604
1605
(when rust-format-on-save
1605
1606
(unless (executable-find rust-rustfmt-bin)
1606
1607
(error " Could not locate executable \" %s \" " rust-rustfmt-bin))))
1607
-
1608
+
1608
1609
(defvar rustc-compilation-regexps
1609
1610
(let ((file " \\ ([^\n ]+\\ )" )
1610
1611
(start-line " \\ ([0-9]+\\ )" )
You can’t perform that action at this time.
0 commit comments