Skip to content

Commit

Permalink
Merge pull request rust-lang#2998 from ReapOmen/fix-rustfmt-diff-output
Browse files Browse the repository at this point in the history
Change `print_diff` to output the correct line number.
  • Loading branch information
nrc committed Sep 12, 2018
2 parents e39bd35 + 992b179 commit f5f64b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rustfmt_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ where
let mut writer = OutputWriter::new(color);

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);

for line in mismatch.lines {
Expand Down

0 comments on commit f5f64b3

Please sign in to comment.