Highlight types and enum members in the rust prelude (#8535)
* Add some rust builtins * rust queries: Add everything in the 2021 prelude * Update runtime/queries/rust/highlights.scm Co-authored-by: Michael Davis <mcarsondavis@gmail.com> --------- Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This commit is contained in:
parent
f65ec32a1c
commit
f9aae99379
1 changed files with 49 additions and 0 deletions
|
@ -55,6 +55,55 @@
|
||||||
"'" @label
|
"'" @label
|
||||||
(identifier) @label)
|
(identifier) @label)
|
||||||
|
|
||||||
|
; ---
|
||||||
|
; Prelude
|
||||||
|
; ---
|
||||||
|
|
||||||
|
((identifier) @type.enum.variant.builtin
|
||||||
|
(#any-of? @type.enum.variant.builtin "Some" "None" "Ok" "Err"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
((type_identifier) @type.builtin
|
||||||
|
(#any-of?
|
||||||
|
@type.builtin
|
||||||
|
"Send"
|
||||||
|
"Sized"
|
||||||
|
"Sync"
|
||||||
|
"Unpin"
|
||||||
|
"Drop"
|
||||||
|
"Fn"
|
||||||
|
"FnMut"
|
||||||
|
"FnOnce"
|
||||||
|
"AsMut"
|
||||||
|
"AsRef"
|
||||||
|
"From"
|
||||||
|
"Into"
|
||||||
|
"DoubleEndedIterator"
|
||||||
|
"ExactSizeIterator"
|
||||||
|
"Extend"
|
||||||
|
"IntoIterator"
|
||||||
|
"Iterator"
|
||||||
|
"Option"
|
||||||
|
"Result"
|
||||||
|
"Clone"
|
||||||
|
"Copy"
|
||||||
|
"Debug"
|
||||||
|
"Default"
|
||||||
|
"Eq"
|
||||||
|
"Hash"
|
||||||
|
"Ord"
|
||||||
|
"PartialEq"
|
||||||
|
"PartialOrd"
|
||||||
|
"ToOwned"
|
||||||
|
"Box"
|
||||||
|
"String"
|
||||||
|
"ToString"
|
||||||
|
"Vec"
|
||||||
|
"FromIterator"
|
||||||
|
"TryFrom"
|
||||||
|
"TryInto"))
|
||||||
|
|
||||||
; ---
|
; ---
|
||||||
; Punctuation
|
; Punctuation
|
||||||
; ---
|
; ---
|
||||||
|
|
Loading…
Add table
Reference in a new issue