Skip to content

Commit bc5bc7f

Browse files
committed
update regexes used in rust-top-item-beg-re
1 parent 06ea73f commit bc5bc7f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,15 @@ Use idomenu (imenu with `ido-mode') for best mileage.")
267267
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
268268

269269
(defvar rust-top-item-beg-re
270-
(concat "\\s-*"
270+
(concat "\\s-*\\(?:priv\\|pub\\)?\\s-*"
271271
;; TODO some of this does only make sense for `fn' (unsafe, extern...)
272272
;; and not other items
273273
(rust-re-shy (concat (rust-re-shy rust-re-vis) "[[:space:]]+")) "?"
274274
(rust-re-shy (concat (rust-re-shy rust-re-async-or-const) "[[:space:]]+")) "?"
275275
(rust-re-shy (concat (rust-re-shy rust-re-unsafe) "[[:space:]]+")) "?"
276276
(regexp-opt
277277
'("enum" "struct" "union" "type" "mod" "use" "fn" "static" "impl"
278-
"extern" "trait"))
278+
"extern" "trait" "async"))
279279
"\\_>")
280280
"Start of a Rust item.")
281281

0 commit comments

Comments
 (0)