[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 85befb9 296/486: Merge pull request #201 from tr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 85befb9 296/486: Merge pull request #201 from tromey/question-indentation |
Date: |
Sat, 7 Aug 2021 09:25:39 -0400 (EDT) |
branch: elpa/rust-mode
commit 85befb942a11c76caf2b7889ed79453fd4512198
Merge: 4d651ab f269c5e
Author: Niko Matsakis <niko@alum.mit.edu>
Commit: GitHub <noreply@github.com>
Merge pull request #201 from tromey/question-indentation
fix syntax of "<" appearing after "?"
---
rust-mode-tests.el | 7 +++++++
rust-mode.el | 3 +++
2 files changed, 10 insertions(+)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 9c9a4d6..98230de 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -1868,6 +1868,13 @@ fn main() {
"))
(test-indent text text)))
+(ert-deftest indent-question-mark-operator ()
+ (test-indent "fn foo() {
+ if bar()? < 1 {
+ }
+ baz();
+}"))
+
(defun rust-test-matching-parens (content pairs &optional nonparen-positions)
"Assert that in rust-mode, given a buffer with the given `content',
emacs's paren matching will find all of the pairs of positions
diff --git a/rust-mode.el b/rust-mode.el
index 5b53277..2307cc0 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -866,6 +866,9 @@ the desired identifiers), but does not match type
annotations \"foo::<\"."
((rust-looking-back-symbols rust-mode-keywords)
(rust-looking-back-symbols '("self" "true" "false")))
+ ((rust-looking-back-str "?")
+ (rust-is-in-expression-context 'ambiguous-operator))
+
;; If we're looking back at an identifier, this depends on whether
;; the identifier is part of an expression or a type
((rust-looking-back-ident)
- [nongnu] elpa/rust-mode 4fce178 251/486: Merge pull request #154 from nikomatsakis/new-errors, (continued)
- [nongnu] elpa/rust-mode 4fce178 251/486: Merge pull request #154 from nikomatsakis/new-errors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e6eceea 253/486: Add macro_rules names to imenu, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5cfb919 265/486: Merge pull request #165 from nikomatsakis/new-errors, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 01ac5d8 272/486: Merge pull request #177 from mrBliss/handle-comments-method-chains, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c091852 283/486: Merge pull request #180 from MicahChalmer/melpa-stable-readme, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8039d12 286/486: Merge pull request #191 from Wooble/readme_link, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0de149a 287/486: Merge pull request #190 from mrBliss/imenu-extern, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ee7043b 289/486: Use syntax-propertize-function, not font-lock-syntactic-keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d7458c2 290/486: set open-paren-in-column-0-is-defun-start to nil, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 4d651ab 295/486: Merge pull request #197 from tromey/syntax-propertize, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 85befb9 296/486: Merge pull request #201 from tromey/question-indentation,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 5469d9b 297/486: fix rust indentation bug, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 367a89c 299/486: Allow formatting with long lines, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 610fe1f 305/486: Address review comments, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 72c479b 311/486: Add `rust-run-clippy' and `rust-buffer-project' with testing paraphernalia., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 4ec735e 300/486: Add stderr output from rustfmt on exit code 3, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9afe997 313/486: Declare `rust-buffer-project' and require `json' at runtime., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b4077f8 314/486: Add `rust-cargo-bin' custom variable., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode d2bb17c 315/486: Skip `rust-test-project-located' without cargo and avoid `find-file' in test., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0985f5f 318/486: Merge pull request #217 from Aankhen/add-clippy-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 34cc528 319/486: Highlight question mark operator using new `rust-question-mark-face'., ELPA Syncer, 2021/08/07