Merge pull request #2998 from ReapOmen/fix-rustfmt-diff-output

Change `print_diff` to output the correct line number.
This commit is contained in:
Nick Cameron 2018-09-12 15:32:27 +12:00 committed by GitHub
commit f5f64b3b4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,7 +161,7 @@ where
let mut writer = OutputWriter::new(color); let mut writer = OutputWriter::new(color);
for mismatch in diff { for mismatch in diff {
let title = get_section_title(mismatch.line_number); let title = get_section_title(mismatch.line_number_orig);
writer.writeln(&title, None); writer.writeln(&title, None);
for line in mismatch.lines { for line in mismatch.lines {