summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-08-14 00:41:03 -0600
committerGitHub <noreply@github.com>2017-08-14 00:41:03 -0600
commit6e9db4665036ca6f0fe8eecf55cd243eaebccc62 (patch)
tree3d70674852b81ecf156ce0e081335ef06c4d59dc /rust-mode.el
parente48a650c44c06c1dd4e4ed0672c50c5446124203 (diff)
parent38f7d891e62ce8bb8ff60a8126fb4ce06af5b6b5 (diff)
downloadrust-mode-6e9db4665036ca6f0fe8eecf55cd243eaebccc62.tar.gz
Merge pull request #230 from tromey/fix-indentation-bug
Fix recognition of "<" as operator in some context
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 1c0921b..ed5b5ed 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -812,6 +812,9 @@ match data if found. Returns nil if not within a Rust string."
;; it to be an expression.
((and (equal token 'open-brace) (rust-looking-back-macro)) t)
+ ;; In a brace context a "]" introduces an expression.
+ ((and (eq token 'open-brace) (rust-looking-back-str "]")))
+
;; An identifier is right after an ending paren, bracket, angle bracket
;; or curly brace. It's a type if the last sexp was a type.
((and (equal token 'ident) (equal 5 (rust-syntax-class-before-point)))