summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorChristophe Troestler <Christophe.Troestler@umons.ac.be>2021-12-27 12:11:49 +0100
committerChristophe Troestler <Christophe.Troestler@umons.ac.be>2021-12-27 19:58:26 +0100
commita56e65c984feb814420a64de95522fd6e228fbca (patch)
tree12c97a1f715431444a8624903814e35d632b828a /rust-mode.el
parent716c0fc6e4db1a3822d8f954f13fb3f1978ce90b (diff)
downloadrust-mode-a56e65c984feb814420a64de95522fd6e228fbca.tar.gz
Improve regexp to match the reference mark &
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 32794c5..773251d 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -467,7 +467,8 @@ Does not match type annotations of the form \"foo::<\"."
;; Question mark operator
("\\?" . 'rust-question-mark)
- ("\\(&\\)'?\\<" 1 'rust-ampersand-face)
+ ("\\(&+\\)\\(?:'\\(?:\\<\\|_\\)\\|\\<\\|[[({:*_|]\\)"
+ 1 'rust-ampersand-face)
)
;; Ensure we highlight `Foo` in `struct Foo` as a type.