Skip to content

Commit

Permalink
[Rust] Stack storage.type under support.type
Browse files Browse the repository at this point in the history
  • Loading branch information
FichteFoll committed Nov 23, 2022
1 parent 4c02b6a commit dfa0200
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Rust/Rust.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,10 @@ contexts:

support-type:
- match: '(Vec|Option|Result|BTreeMap|HashMap|Box|Rc|Arc|AsRef|AsMut|Into|From)\s*(?=<)'
scope: support.type.rust
scope: storage.type.rust support.type.rust
push: generic-angles
- 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
scope: support.type.rust
scope: storage.type.rust support.type.rust

type:
# A low-level type. Typically you want types-any for the full type grammar.
Expand Down
3 changes: 2 additions & 1 deletion Rust/tests/syntax_test_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,15 @@ let p_imm: *const u32 = &i as *const u32;

type Snail = Vec<SnailNum>;
// ^^^^^^^^^^^^^ meta.generic.rust
// ^^^ support.type.rust
// ^^^ storage.type.rust support.type.rust
// ^ punctuation.definition.generic.begin.rust
// ^^^^^^^^ storage.type.rust
// ^ punctuation.definition.generic.end.rust

type ExampleRawPointer = HashMap<*const i32, Option<i32>, BuildHasherDefault<FnvHasher>>;
// ^^^^^^ meta.generic storage.modifier
// ^^^ meta.generic storage.type
// ^^^^^^ storage.type.rust support.type.rust


// Anonymous lifetimes.
Expand Down

0 comments on commit dfa0200

Please sign in to comment.