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 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|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|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b/,
'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/,

'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.

12 changes: 6 additions & 6 deletions tests/languages/rust/keyword_feature.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
abstract alignof as
be box break const
continue crate do
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 struct super
self Self struct super
true trait type typeof
unsafe unsized use
union unsafe unsized use
virtual where while
yield

Expand All @@ -19,17 +19,17 @@ yield
[
["keyword", "abstract"], ["keyword", "alignof"], ["keyword", "as"],
["keyword", "be"], ["keyword", "box"], ["keyword", "break"], ["keyword", "const"],
["keyword", "continue"], ["keyword", "crate"], ["keyword", "do"],
["keyword", "continue"], ["keyword", "crate"], ["keyword", "do"], ["keyword", "dyn"],
["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"],
["keyword", "false"], ["keyword", "final"], ["keyword", "fn"], ["keyword", "for"],
["keyword", "if"], ["keyword", "impl"], ["keyword", "in"], ["keyword", "let"], ["keyword", "loop"],
["keyword", "match"], ["keyword", "mod"], ["keyword", "move"], ["keyword", "mut"],
["keyword", "offsetof"], ["keyword", "once"], ["keyword", "override"],
["keyword", "priv"], ["keyword", "pub"], ["keyword", "pure"], ["keyword", "ref"],
["keyword", "return"], ["keyword", "sizeof"], ["keyword", "static"],
["keyword", "self"], ["keyword", "struct"], ["keyword", "super"],
["keyword", "self"], ["keyword", "Self"], ["keyword", "struct"], ["keyword", "super"],
["keyword", "true"], ["keyword", "trait"], ["keyword", "type"], ["keyword", "typeof"],
["keyword", "unsafe"], ["keyword", "unsized"], ["keyword", "use"],
["keyword", "union"], ["keyword", "unsafe"], ["keyword", "unsized"], ["keyword", "use"],
["keyword", "virtual"], ["keyword", "where"], ["keyword", "while"],
["keyword", "yield"]
]
Expand Down