Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f5f64b3

Browse files
authored
Merge pull request rust-lang#2998 from ReapOmen/fix-rustfmt-diff-output
Change `print_diff` to output the correct line number.
2 parents e39bd35 + 992b179 commit f5f64b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustfmt_diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ where
161161
let mut writer = OutputWriter::new(color);
162162

163163
for mismatch in diff {
164-
let title = get_section_title(mismatch.line_number);
164+
let title = get_section_title(mismatch.line_number_orig);
165165
writer.writeln(&title, None);
166166

167167
for line in mismatch.lines {

0 commit comments

Comments
 (0)