diff options
| author | Tom Tromey <tom@tromey.com> | 2017-04-11 21:43:44 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-11 21:43:44 -0600 |
| commit | dae5af71ebf4b5c6797ef057e8a0ebf655bcdbfb (patch) | |
| tree | e4093fdd2e16cc8b003d4b971b556b0d52d059fa /rust-mode-tests.el | |
| parent | 85befb942a11c76caf2b7889ed79453fd4512198 (diff) | |
| parent | 5469d9bc3a13c75a8e98a86b6005d3540eb92524 (diff) | |
| download | rust-mode-dae5af71ebf4b5c6797ef057e8a0ebf655bcdbfb.tar.gz | |
Merge pull request #198 from tromey/indentation-fix
fix rust indentation bug
Diffstat (limited to 'rust-mode-tests.el')
| -rw-r--r-- | rust-mode-tests.el | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 98230de..5abd4a7 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -1628,6 +1628,34 @@ fn main() { " ))) +(ert-deftest indent-function-after-where () + (let ((rust-indent-method-chain t)) (test-indent + " +fn each_split_within<'a, F>(ss: &'a str, lim: usize, mut it: F) + -> bool where F: FnMut(&'a str) -> bool { +} + +#[test] +fn test_split_within() { +} +" + ))) + +(ert-deftest indent-function-after-where-nested () + (let ((rust-indent-method-chain t)) (test-indent + " +fn outer() { + fn each_split_within<'a, F>(ss: &'a str, lim: usize, mut it: F) + -> bool where F: FnMut(&'a str) -> bool { + } + #[test] + fn test_split_within() { + } + fn bar() { + } +} +" + ))) (ert-deftest test-for-issue-36-syntax-corrupted-state () "This is a test for a issue #36, which involved emacs's |
