From a56e65c984feb814420a64de95522fd6e228fbca Mon Sep 17 00:00:00 2001 From: Christophe Troestler Date: Mon, 27 Dec 2021 12:11:49 +0100 Subject: Improve regexp to match the reference mark & --- rust-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3