branch: elpa/rust-mode
commit bc5bc7f13ae52e61c1eeb5ce5f898b9c04212dce
Author: brotzeit <[email protected]>
Commit: brotzeit <[email protected]>
update regexes used in rust-top-item-beg-re
---
rust-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust-mode.el b/rust-mode.el
index 58897fd..f513065 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -267,7 +267,7 @@ Use idomenu (imenu with `ido-mode') for best mileage.")
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
(defvar rust-top-item-beg-re
- (concat "\\s-*"
+ (concat "\\s-*\\(?:priv\\|pub\\)?\\s-*"
;; TODO some of this does only make sense for `fn' (unsafe,
extern...)
;; and not other items
(rust-re-shy (concat (rust-re-shy rust-re-vis) "[[:space:]]+")) "?"
@@ -275,7 +275,7 @@ Use idomenu (imenu with `ido-mode') for best mileage.")
(rust-re-shy (concat (rust-re-shy rust-re-unsafe) "[[:space:]]+"))
"?"
(regexp-opt
'("enum" "struct" "union" "type" "mod" "use" "fn" "static" "impl"
- "extern" "trait"))
+ "extern" "trait" "async"))
"\\_>")
"Start of a Rust item.")