Skip to content

Commit 1a1c47b

Browse files
pnkfelixalexcrichton
authored andcommitted
Update emacs mode to support new #![inner(attribute)] syntax.
1 parent 898669c commit 1a1c47b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/etc/emacs/rust-mode.el

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@
196196
;; Special types
197197
(,(regexp-opt rust-special-types 'words) . font-lock-type-face)
198198

199-
;; Attributes like `#[bar(baz)]`
200-
(,(rust-re-grab (concat "#\\[" rust-re-ident "[^]]*\\]"))
199+
;; Attributes like `#[bar(baz)]` or `#![bar(baz)]`
200+
(,(rust-re-grab (concat "#\\!?[" rust-re-ident "[^]]*\\]"))
201201
1 font-lock-preprocessor-face)
202202

203203
;; Syntax extension invocations like `foo!`, highlight including the !

0 commit comments

Comments
 (0)