Skip to content

Commit

Permalink
Add async / await keywords for Rust. (#1882)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfbiedert authored and mAAdhaTTah committed May 7, 2019
1 parent c24831b commit 4faa331
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/prism-rust.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Prism.languages.rust = {
pattern: /'[^\s>']+/,
alias: 'symbol'
},
'keyword': /\b(?:abstract|alignof|as|be|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|Self|struct|super|true|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,
'keyword': /\b(?:abstract|alignof|as|async|await|be|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|Self|struct|super|true|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,

'attribute': {
pattern: /#!?\[.+?\]/,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-rust.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/languages/rust/keyword_feature.test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
abstract alignof as
be box break const
abstract alignof as async
await be box break const
continue crate do dyn
else enum extern
false final fn for
Expand All @@ -17,7 +17,7 @@ yield
----------------------------------------------------

[
["keyword", "abstract"], ["keyword", "alignof"], ["keyword", "as"],
["keyword", "abstract"], ["keyword", "alignof"], ["keyword", "as"], ["keyword", "async"], ["keyword", "await"],
["keyword", "be"], ["keyword", "box"], ["keyword", "break"], ["keyword", "const"],
["keyword", "continue"], ["keyword", "crate"], ["keyword", "do"], ["keyword", "dyn"],
["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"],
Expand Down

0 comments on commit 4faa331

Please sign in to comment.