@@ -10,6 +10,7 @@ variables:
10
10
escaped_byte : ' \\(x\h{2}|n|r|t|0|"|'' |\\)'
11
11
escaped_char : ' \\(x\h{2}|n|r|t|0|"|'' |\\|u\{\h{1,6}\})'
12
12
int_suffixes : ' i8|i16|i32|i64|isize|u8|u16|u32|u64|usize'
13
+ support_type : \b(Copy|Send|Sized|Sync|Drop|Fn|FnMut|FnOnce|Box|ToOwned|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator|Option|Some|None|Result|Ok|Err|SliceConcatExt|String|ToString|Vec)\b
13
14
contexts :
14
15
main :
15
16
- include : statements
@@ -188,7 +189,7 @@ contexts:
188
189
- match : ' \b[[:lower:]_][[:lower:][:digit:]_]*!(?=\s*(\(|\{|\[))'
189
190
scope : support.macro.rust
190
191
191
- - match : \b(Copy|Send|Sized|Sync|Drop|Fn|FnMut|FnOnce|Box|ToOwned|Clone|PartialEq|PartialOrd|Eq|Ord|AsRef|AsMut|Into|From|Default|Iterator|Extend|IntoIterator|DoubleEndedIterator|ExactSizeIterator|Option|Some|None|Result|Ok|Err|SliceConcatExt|String|ToString|Vec)\b
192
+ - match : ' {{support_type}} '
192
193
scope : support.type.rust
193
194
194
195
- include : basic-identifiers
@@ -427,7 +428,9 @@ contexts:
427
428
- include : block
428
429
429
430
type :
430
- - match : ' {{identifier}}(?=<)'
431
+ - match : (?:{{support_type}}|{{identifier}})(?=<)
432
+ captures :
433
+ 1 : support.type.rust
431
434
push : generic-angles
432
435
- match : \b(Self|i8|i16|i32|i64|isize|u8|u16|u32|u64|usize|f32|f64|bool|char|str)\b
433
436
scope : storage.type.rust
@@ -484,6 +487,8 @@ contexts:
484
487
pop : true
485
488
- include : generic-angles-contents
486
489
- include : type-any-identifier
490
+ - match : ' {{support_type}}'
491
+ scope : support.type.rust
487
492
- match : ' :'
488
493
scope : punctuation.separator.rust
489
494
- match : ' \+'
0 commit comments