File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,11 @@ function or trait. When nil, where will be aligned with fn or trait."
180
180
:safe #'booleanp
181
181
:group 'rust-mode )
182
182
183
+ (defface rust-unsafe-face
184
+ '((t :inherit font-lock-warning-face ))
185
+ " Face for the `unsafe' keyword."
186
+ :group 'rust-mode )
187
+
183
188
(defun rust-paren-level () (nth 0 (syntax-ppss )))
184
189
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss )))
185
190
(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss ))))
@@ -488,7 +493,7 @@ function or trait. When nil, where will be aligned with fn or trait."
488
493
" ref" " return"
489
494
" self" " static" " struct" " super"
490
495
" true" " trait" " type"
491
- " unsafe " " use"
496
+ " use"
492
497
" virtual"
493
498
" where" " while" ))
494
499
@@ -529,6 +534,9 @@ function or trait. When nil, where will be aligned with fn or trait."
529
534
; ; Special types
530
535
(,(regexp-opt-symbols rust-special-types) . font-lock-type-face )
531
536
537
+ ; ; The unsafe keyword
538
+ (" \\ _<unsafe\\ _>" . 'rust-unsafe-face )
539
+
532
540
; ; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]`
533
541
(,(rust-re-grab (concat " #\\ !?\\ [" rust-re-ident " [^]]*\\ ]" ))
534
542
1 font-lock-preprocessor-face keep)
You can’t perform that action at this time.
0 commit comments