diff options
| author | Jonas Westlund <jonaswestlund101@gmail.com> | 2018-02-15 18:19:37 +0100 |
|---|---|---|
| committer | Jonas Westlund <jonaswestlund101@gmail.com> | 2018-02-15 18:19:37 +0100 |
| commit | b861aa9e54e2af362d702ae4bf8741ea4617dc3c (patch) | |
| tree | 1ec2203756594a440a3acd58606d413a6a94d8fb /rust-mode-tests.el | |
| parent | 0d408d5fe5bae38f6463e78486eab4263d4ae40d (diff) | |
| download | rust-mode-b861aa9e54e2af362d702ae4bf8741ea4617dc3c.tar.gz | |
Fixed indent when ? operator is used in chained method calls
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index fd29d5d..3e6c67a 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -1668,6 +1668,18 @@ fn main() { " ))) +(ert-deftest indent-method-chains-no-align-with-question-mark-operator () + (let ((rust-indent-method-chain nil)) (test-indent + " +fn main() { + let x = thing.do_it() + .aligned() + .more_alignment()? + .more_alignment(); +} +" + ))) + (ert-deftest indent-method-chains-with-align () (let ((rust-indent-method-chain t)) (test-indent " @@ -1679,6 +1691,18 @@ fn main() { " ))) +(ert-deftest indent-method-chains-with-align-with-question-mark-operator () + (let ((rust-indent-method-chain t)) (test-indent + " +fn main() { + let x = thing.do_it() + .aligned() + .more_alignment()? + .more_alignment(); +} +" + ))) + (ert-deftest indent-method-chains-with-align-and-second-stmt () (let ((rust-indent-method-chain t)) (test-indent " |
