Skip to content

Commit 7029846

Browse files
committed
test: Subtract code_offset from width for ui_testing
1 parent 8c2084d commit 7029846

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_errors/src/emitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2021,7 +2021,7 @@ impl HumanEmitter {
20212021
if let Some(width) = self.diagnostic_width {
20222022
width.saturating_sub(code_offset)
20232023
} else if self.ui_testing || cfg!(miri) {
2024-
DEFAULT_COLUMN_WIDTH
2024+
DEFAULT_COLUMN_WIDTH.saturating_sub(code_offset)
20252025
} else {
20262026
termize::dimensions()
20272027
.map(|(w, _)| w.saturating_sub(code_offset))

0 commit comments

Comments
 (0)