diff options
| author | Christophe Troestler <Christophe.Troestler@umons.ac.be> | 2021-12-27 12:11:49 +0100 |
|---|---|---|
| committer | Christophe Troestler <Christophe.Troestler@umons.ac.be> | 2021-12-27 19:58:26 +0100 |
| commit | a56e65c984feb814420a64de95522fd6e228fbca (patch) | |
| tree | 12c97a1f715431444a8624903814e35d632b828a | |
| parent | 716c0fc6e4db1a3822d8f954f13fb3f1978ce90b (diff) | |
| download | rust-mode-a56e65c984feb814420a64de95522fd6e228fbca.tar.gz | |
Improve regexp to match the reference mark &
| -rw-r--r-- | rust-mode.el | 3 |
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. |
