[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 216faf2 353/486: Do not indent where clause by d
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 216faf2 353/486: Do not indent where clause by default (follow standard) #257 |
Date: |
Sat, 7 Aug 2021 09:25:51 -0400 (EDT) |
branch: elpa/rust-mode
commit 216faf2a7372a252a7e2190c9a7474dcab71e93a
Author: Sebastien Chapuis <sebastien@chapu.is>
Commit: Sebastien Chapuis <sebastien@chapu.is>
Do not indent where clause by default (follow standard) #257
---
rust-mode-tests.el | 33 ++++++++++++++++++++-------------
rust-mode.el | 2 +-
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index b2e8338..6c6e9af 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -451,7 +451,8 @@ fn foo4(a:i32,
"))
(ert-deftest indent-body-after-where ()
- (test-indent
+ (let ((rust-indent-where-clause t))
+ (test-indent
"
fn foo1(a: A, b: B) -> A
where A: Clone + Default, B: Eq {
@@ -469,10 +470,11 @@ fn foo2(a: A, b: B) -> A
bar: 3
}
}
-"))
+")))
(ert-deftest indent-align-where-clauses-style1a ()
- (test-indent
+ (let ((rust-indent-where-clause t))
+ (test-indent
"
fn foo1a(a: A, b: B, c: C) -> D
where A: Clone + Default,
@@ -484,10 +486,11 @@ fn foo1a(a: A, b: B, c: C) -> D
bar: 3
}
}
-"))
+")))
(ert-deftest indent-align-where-clauses-style1b ()
- (test-indent
+ (let ((rust-indent-where-clause t))
+ (test-indent
"
fn foo1b(a: A, b: B, c: C) -> D
where A: Clone + Default,
@@ -500,7 +503,7 @@ fn foo1b(a: A, b: B, c: C) -> D
bar: 3
}
}
-"))
+")))
(ert-deftest indent-align-where-clauses-style2a ()
(test-indent
@@ -596,7 +599,8 @@ where A: Clone + Default,
")))
(ert-deftest indent-align-where-clauses-impl-example ()
- (test-indent
+ (let ((rust-indent-where-clause t))
+ (test-indent
"
impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V, S>
where K: Eq + Hash + Borrow<Q>,
@@ -608,10 +612,11 @@ impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K,
V, S>
bar: 3
}
}
-"))
+")))
(ert-deftest indent-align-where-clauses-first-line ()
- (test-indent
+ (let ((rust-indent-where-clause t))
+ (test-indent
"fn foo1(a: A, b: B) -> A
where A: Clone + Default, B: Eq {
let body;
@@ -619,7 +624,7 @@ impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V,
S>
bar: 3
}
}
-"))
+")))
(ert-deftest indent-align-where-in-comment1 ()
(test-indent
@@ -632,7 +637,8 @@ pub struct Region { // <-- this should be flush with left
margin!
"))
(ert-deftest indent-align-where-in-comment2 ()
- (test-indent
+ (let ((rust-indent-where-clause t))
+ (test-indent
"fn foo<F,G>(f:F, g:G)
where F:Send,
// where
@@ -640,9 +646,10 @@ pub struct Region { // <-- this should be flush with left
margin!
{
let body;
}
-"))
+")))
(ert-deftest indent-align-where-in-comment3 ()
+ (let ((rust-indent-where-clause t))
(test-indent
"fn foo<F,G>(f:F, g:G)
where F:Send,
@@ -651,7 +658,7 @@ pub struct Region { // <-- this should be flush with left
margin!
{
let body;
}
-"))
+")))
(ert-deftest indent-square-bracket-alignment ()
(test-indent
diff --git a/rust-mode.el b/rust-mode.el
index 6193ebe..4fc1783 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -121,7 +121,7 @@
:group 'rust-mode
:safe #'booleanp)
-(defcustom rust-indent-where-clause t
+(defcustom rust-indent-where-clause nil
"Indent the line starting with the where keyword following a
function or trait. When nil, where will be aligned with fn or trait."
:type 'boolean
- [nongnu] elpa/rust-mode 60a1f36 310/486: Merge pull request #216 from Aankhen/set-compile-command, (continued)
- [nongnu] elpa/rust-mode 60a1f36 310/486: Merge pull request #216 from Aankhen/set-compile-command, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 128601b 317/486: Improve content of `test-project/Cargo.toml'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 30a9d39 322/486: Merge pull request #221 from Wilfred/highlight_union_contextual_keyword, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6093d38 327/486: Add syntax coloring for type-inferred constants and variables, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 38f7d89 330/486: Fix recognition of "<" as operator in some context, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0ded5ea 332/486: Add support for u128 and i128 types, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f57a8eb 333/486: Merge pull request #233 from shanavas786/add-128, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6b71c0a 348/486: fix rust--format-call, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a90730f 349/486: don't set-window-start for selected window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 27911c8 351/486: Merge pull request #251 from brotzeit/rust-format-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 216faf2 353/486: Do not indent where clause by default (follow standard) #257,
ELPA Syncer <=
- [nongnu] elpa/rust-mode e201404 367/486: Fix font-locking of "let ref", ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 8d32dc6 370/486: Add keywords `async` and `try`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 54a9c3d 380/486: Merge pull request #296 from dekellum/indent-return-type-defcustom, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ce7a27f 381/486: Add compilation mode warning face, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c1059d6 387/486: Added angle bracket tests, some of which fail without the fix, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 06f1c68 389/486: Merge pull request #300 from mmilenko/rust-looking-back-macro--backward-char--fix, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 48290d3 399/486: Merge pull request #318 from kraai/patch-1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f6ebcbd 400/486: Update travis scripts to use EVM, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 077cba7 402/486: Add local docker based tests runner, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1d42d69 416/486: Speed up line indentation inside strings (#313), ELPA Syncer, 2021/08/07