Skip to content

Commit 926ec1c

Browse files
committed
Auto merge of rust-lang#83639 - osa1:issue83638, r=estebank
Replace tabs in err messages before rendering This is done in other call sites, but was missing in one place. Fixes rust-lang#83638
2 parents 7b6fc5a + 8d7432a commit 926ec1c

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

compiler/rustc_errors/src/emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ impl EmitterWriter {
12581258
buffer.append(0, ": ", header_style);
12591259
}
12601260
for &(ref text, _) in msg.iter() {
1261-
buffer.append(0, text, header_style);
1261+
buffer.append(0, &replace_tabs(text), header_style);
12621262
}
12631263
}
12641264

src/test/ui/issue-83639.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// check-fail
2+
// ignore-tidy-tab
3+
4+
fn main() {
5+
""" " //~ ERROR
6+
}

src/test/ui/issue-83639.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: expected one of `.`, `;`, `?`, `}`, or an operator, found `" "`
2+
--> $DIR/issue-83639.rs:5:7
3+
|
4+
LL | """ "
5+
| ^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
6+
7+
error: aborting due to previous error
8+

0 commit comments

Comments
 (0)