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 173
173
:safe #'booleanp
174
174
:group 'rust-mode )
175
175
176
+ (defface rust-unsafe-face
177
+ '((t :inherit font-lock-warning-face ))
178
+ " Face for the `unsafe' keyword."
179
+ :group 'rust-mode )
180
+
176
181
(defun rust-paren-level () (nth 0 (syntax-ppss )))
177
182
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss )))
178
183
(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss ))))
414
419
" ref" " return"
415
420
" self" " static" " struct" " super"
416
421
" true" " trait" " type"
417
- " unsafe " " use"
422
+ " use"
418
423
" virtual"
419
424
" where" " while" ))
420
425
455
460
; ; Special types
456
461
(,(regexp-opt-symbols rust-special-types) . font-lock-type-face )
457
462
463
+ ; ; The unsafe keyword
464
+ (" \\ _<unsafe\\ _>" . 'rust-unsafe-face )
465
+
458
466
; ; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]`
459
467
(,(rust-re-grab (concat " #\\ !?\\ [" rust-re-ident " [^]]*\\ ]" ))
460
468
1 font-lock-preprocessor-face keep)
You can’t perform that action at this time.
0 commit comments