summaryrefslogtreecommitdiff
path: root/rust-mode-tests.el
diff options
context:
space:
mode:
authormrBliss <dewinant@gmail.com>2015-12-02 13:47:50 +0100
committermrBliss <dewinant@gmail.com>2015-12-02 13:54:11 +0100
commit92584c303acc417501d1faa593ff1392fd306c1d (patch)
tree70c57f5b01521ee306a65b31a458bdd38b100aa7 /rust-mode-tests.el
parentb76e803768bd572424b3f111aa55269f5d8226fc (diff)
downloadrust-mode-92584c303acc417501d1faa593ff1392fd306c1d.tar.gz
Fix the special case for the first line
This special case broke indentation of `where` clauses.
Diffstat (limited to 'rust-mode-tests.el')
-rw-r--r--rust-mode-tests.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index e224e67..cc76007 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -603,6 +603,17 @@ impl<'a, K, Q: ?Sized, V, S> Index<&'a Q> for HashMap<K, V, S>
}
"))
+(ert-deftest indent-align-where-clauses-first-line ()
+ (test-indent
+ "fn foo1(a: A, b: B) -> A
+ where A: Clone + Default, B: Eq {
+ let body;
+ Foo {
+ bar: 3
+ }
+}
+"))
+
(ert-deftest indent-square-bracket-alignment ()
(test-indent
"