Merge pull request #433 from sinhpham/fix_430

Fix https://github.com/nrc/rustfmt/issues/430
This commit is contained in:
Nick Cameron 2015-10-09 18:51:58 +13:00
commit e9ea76983c
3 changed files with 6 additions and 2 deletions

View File

@ -395,7 +395,7 @@ fn next(&mut self) -> Option<Self::Item> {
separator_index + 1)
}
// Potential *single* line comment.
(_, Some(j)) => j + 1,
(_, Some(j)) if j > separator_index => j + 1,
_ => post_snippet.len(),
}
}

View File

@ -108,4 +108,7 @@ fn main() {
let rc = RefCell::new(42usize,remaining_width, remaining_width); // a comment
let x = "Hello!!!!!!!!! abcd abcd abcd abcd abcd abcd\n abcd abcd abcd abcd abcd abcd abcd abcd abcd \
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd"; }
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd";
let s = expand(a
,
b); }

View File

@ -139,4 +139,5 @@ fn main() {
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd \
abcd abcd";
let s = expand(a, b);
}