lib/rouge/lexers/rust.rb in rouge-3.27.0 vs lib/rouge/lexers/rust.rb in rouge-3.28.0

- old
+ new

@@ -20,14 +20,17 @@ return true if text.shebang? 'rustc' end def self.keywords @keywords ||= %w( - as assert async await break crate const continue copy do drop dyn else enum extern - fail false fn for if impl let log loop macro match mod move mut priv pub pure - ref return self Self static struct super true try trait type union unsafe use - where while yield box + as async await break const continue crate dyn else enum extern false + fn for if impl in let log loop match mod move mut pub ref return self + Self static struct super trait true type unsafe use where while + abstract become box do final macro + override priv typeof unsized virtual + yield try + union ) end def self.builtins @builtins ||= Set.new %w( @@ -210,10 +213,11 @@ mixin :macro end state :has_literals do # constants - rule %r/\b(?:true|false|nil)\b/, Keyword::Constant + rule %r/\b(?:true|false)\b/, Keyword::Constant + # characters/bytes rule %r( b?' (?: #{escapes} | [^\\] ) ' )x, Str::Char