summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-01-07 07:51:36 -0500
committerGitHub <noreply@github.com>2017-01-07 07:51:36 -0500
commit5c68cafd46c4bc20ccba08f3f91dfce808c6dffe (patch)
treeac3126382288d0b449e8c292d229982c7fdb4633 /rust-mode.el
parent8f1297a5f6da4a587abf604756d7a99b046616d5 (diff)
parentcc59c8387fde46b673a1784c60ff5117ed82eef0 (diff)
downloadrust-mode-5c68cafd46c4bc20ccba08f3f91dfce808c6dffe.tar.gz
Merge pull request #175 from mrBliss/imenu-unsafe
Recognize imenu items starting with "unsafe"
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el
index b8f26d3..1527c7a 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -32,6 +32,7 @@
(defconst rust-re-lc-ident "[[:lower:][:multibyte:]_][[:word:][:multibyte:]_[:digit:]]*")
(defconst rust-re-uc-ident "[[:upper:]][[:word:][:multibyte:]_[:digit:]]*")
(defconst rust-re-vis "pub")
+(defconst rust-re-unsafe "unsafe")
(defconst rust-re-non-standard-string
(rx
@@ -569,6 +570,7 @@ buffer."
(defun rust-re-item-def-imenu (itype)
(concat "^[[:space:]]*"
(rust-re-shy (concat (rust-re-word rust-re-vis) "[[:space:]]+")) "?"
+ (rust-re-shy (concat (rust-re-word rust-re-unsafe) "[[:space:]]+")) "?"
(rust-re-item-def itype)))
(defconst rust-re-special-types (regexp-opt rust-special-types 'symbols))