Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RustEnhanced.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ contexts:
- match: \b(crate|extern|use|where)\b
scope: keyword.other.rust

- match: \b(else|for|if|loop|match|while|yield)\b
- match: \b(async|await|else|for|if|loop|match|try|while|yield)\b
scope: keyword.control.rust

- match: \b(break|continue)\b
Expand Down
10 changes: 10 additions & 0 deletions tests/syntax-rust/syntax_test_misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,13 @@ let override = 1;
// ^^^^^^^^ invalid.illegal.rust
let macro = 1;
// ^^^^^ invalid.illegal.rust

// async/await
let x = async {}
// ^^^^^ keyword.control.rust
let y = future.await;
// ^^^^^ keyword.control.rust

// try keyword in 2018 edition
let x = try {}
// ^^^ keyword.control.rust