Skip to content

Commit

Permalink
Updated literal suffixes to isize and usize.
Browse files Browse the repository at this point in the history
The literals 0is and 0us have been deprecated in favor of 0isize and 0usize.
Reference: rust-lang/rfcs#573
  • Loading branch information
gustavla committed Mar 5, 2015
1 parent 2450ecf commit 2685476
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions syntax/rust.vim
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDe
syn region rustDerive start="derive(" end=")" contained contains=rustTrait

" Number literals
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(s\|8\|16\|32\|64\)\)\="
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(s\|8\|16\|32\|64\)\)\="
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\)\)\="
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="

" Special case for numbers of the form "1." which are float literals, unless followed by
" an identifier, which makes them integer literals with a method call or field access,
Expand Down

0 comments on commit 2685476

Please sign in to comment.