Skip to content

Commit a56e65c

Browse files
committed
Improve regexp to match the reference mark &
1 parent 716c0fc commit a56e65c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,8 @@ Does not match type annotations of the form \"foo::<\"."
467467

468468
;; Question mark operator
469469
("\\?" . 'rust-question-mark)
470-
("\\(&\\)'?\\<" 1 'rust-ampersand-face)
470+
("\\(&+\\)\\(?:'\\(?:\\<\\|_\\)\\|\\<\\|[[({:*_|]\\)"
471+
1 'rust-ampersand-face)
471472
)
472473

473474
;; Ensure we highlight `Foo` in `struct Foo` as a type.

0 commit comments

Comments
 (0)