]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #14056 : kballard/rust/vim_indent_fix, r=huonw
authorbors <bors@rust-lang.org>
Sat, 10 May 2014 06:51:30 +0000 (23:51 -0700)
committerbors <bors@rust-lang.org>
Sat, 10 May 2014 06:51:30 +0000 (23:51 -0700)
cindent handles the following case incorrectly:

    impl X {
        b: int,
        //
        c: int,
    }

if you try and insert a new line after the `c` declaration.

To fix this, fix the get_line_trimmed() function to work properly, and
then extend GetRustIndent to keep searching backwards until it finds a
non-blank line after trimming. This lets it handle the trailing comma
case properly, as if the comment were never there.

Fixes #14041.


Trivial merge