@@ -10,6 +10,7 @@ variables:
1010 escaped_byte : ' \\(x\h{2}|n|r|t|0|"|'' |\\)'
1111 escaped_char : ' \\(x\h{2}|n|r|t|0|"|'' |\\|u\{\h{1,6}\})'
1212 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
1314contexts :
1415 main :
1516 - include : statements
@@ -188,7 +189,7 @@ contexts:
188189 - match : ' \b[[:lower:]_][[:lower:][:digit:]_]*!(?=\s*(\(|\{|\[))'
189190 scope : support.macro.rust
190191
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}} '
192193 scope : support.type.rust
193194
194195 - include : basic-identifiers
@@ -427,7 +428,9 @@ contexts:
427428 - include : block
428429
429430 type :
430- - match : ' {{identifier}}(?=<)'
431+ - match : (?:{{support_type}}|{{identifier}})(?=<)
432+ captures :
433+ 1 : support.type.rust
431434 push : generic-angles
432435 - match : \b(Self|i8|i16|i32|i64|isize|u8|u16|u32|u64|usize|f32|f64|bool|char|str)\b
433436 scope : storage.type.rust
@@ -484,6 +487,8 @@ contexts:
484487 pop : true
485488 - include : generic-angles-contents
486489 - include : type-any-identifier
490+ - match : ' {{support_type}}'
491+ scope : support.type.rust
487492 - match : ' :'
488493 scope : punctuation.separator.rust
489494 - match : ' \+'
0 commit comments