@@ -544,6 +544,7 @@ buffer."
544
544
" u16" " i16"
545
545
" u32" " i32"
546
546
" u64" " i64"
547
+ " u128" " i128"
547
548
548
549
" f32" " f64"
549
550
" float" " int" " uint" " isize" " usize"
@@ -753,7 +754,7 @@ match data if found. Returns nil if not within a Rust string."
753
754
can have a where clause, rewind back to just before the name of
754
755
the subject of that where clause and return the new point.
755
756
Otherwise return nil"
756
-
757
+
757
758
(let* ((ident-pos (point ))
758
759
(newpos (save-excursion
759
760
(rust-rewind-irrelevant)
@@ -796,7 +797,7 @@ match data if found. Returns nil if not within a Rust string."
796
797
; ; A type alias or ascription could have a type param list. Skip backwards past it.
797
798
(when (member token '(ambiguous-operator open-brace))
798
799
(rust-rewind-type-param-list))
799
-
800
+
800
801
(cond
801
802
802
803
; ; Certain keywords always introduce expressions
@@ -811,7 +812,7 @@ match data if found. Returns nil if not within a Rust string."
811
812
; ; An ident! followed by an open brace is a macro invocation. Consider
812
813
; ; it to be an expression.
813
814
((and (equal token 'open-brace ) (rust-looking-back-macro)) t )
814
-
815
+
815
816
; ; In a brace context a "]" introduces an expression.
816
817
((and (eq token 'open-brace ) (rust-looking-back-str " ]" )))
817
818
@@ -828,7 +829,7 @@ match data if found. Returns nil if not within a Rust string."
828
829
(backward-sexp )
829
830
(rust-rewind-irrelevant)
830
831
(looking-back " [{;]" (1- (point ))))
831
-
832
+
832
833
((rust-looking-back-ident)
833
834
(rust-rewind-qualified-ident)
834
835
(rust-rewind-irrelevant)
@@ -851,7 +852,7 @@ match data if found. Returns nil if not within a Rust string."
851
852
(rust-rewind-irrelevant)
852
853
(rust-looking-back-symbols '(" enum" " struct" " union" " trait" " type" ))))))
853
854
))
854
-
855
+
855
856
((equal token 'ambiguous-operator )
856
857
(cond
857
858
; ; An ampersand after an ident has to be an operator rather than a & at the beginning of a ref type
@@ -882,7 +883,7 @@ match data if found. Returns nil if not within a Rust string."
882
883
(rust-rewind-irrelevant)
883
884
(rust-looking-back-str " enum" )))))
884
885
t )
885
-
886
+
886
887
; ; Otherwise the ambiguous operator is a type if the identifier is a type
887
888
((rust-is-in-expression-context 'ident ) t )))
888
889
@@ -931,7 +932,7 @@ match data if found. Returns nil if not within a Rust string."
931
932
932
933
; ; A :: introduces a type (or module, but not an expression in any case)
933
934
((rust-looking-back-str " ::" ) nil )
934
-
935
+
935
936
((rust-looking-back-str " :" )
936
937
(backward-char )
937
938
(rust-is-in-expression-context 'colon ))
@@ -970,7 +971,7 @@ match data if found. Returns nil if not within a Rust string."
970
971
(defun rust-is-lt-char-operator ()
971
972
" Return t if the < sign just after point is an operator rather
972
973
than an opening angle bracket, otherwise nil."
973
-
974
+
974
975
(let ((case-fold-search nil ))
975
976
(save-excursion
976
977
(rust-rewind-irrelevant)
@@ -982,7 +983,7 @@ match data if found. Returns nil if not within a Rust string."
982
983
((and (rust-looking-back-str " <" )
983
984
(not (equal 4 (rust-syntax-class-before-point)))
984
985
(not (rust-looking-back-str " <<" ))))
985
-
986
+
986
987
; ; On the other hand, if we are after a closing paren/brace/bracket it
987
988
; ; can only be an operator, not an angle bracket. Likewise, if we are
988
989
; ; after a string it's an operator. (The string case could actually be
@@ -1010,7 +1011,7 @@ match data if found. Returns nil if not within a Rust string."
1010
1011
; ; The special types can't take type param lists, so a < after one is
1011
1012
; ; always an operator
1012
1013
(looking-at rust-re-special-types)
1013
-
1014
+
1014
1015
(rust-is-in-expression-context 'ident )))
1015
1016
1016
1017
; ; Otherwise, assume it's an angle bracket
@@ -1045,7 +1046,7 @@ should be considered a paired angle bracket."
1045
1046
; ; to balance regardless of the < and >, so if we don't treat any < or >
1046
1047
; ; as angle brackets it won't mess up any paren balancing.
1047
1048
((rust-in-macro) t )
1048
-
1049
+
1049
1050
((looking-at " <" )
1050
1051
(rust-is-lt-char-operator))
1051
1052
0 commit comments