diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-04-21 06:44:30 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-21 06:44:30 +0200 |
| commit | 637d9ddc35552a3ccc163efc5df2fc7af642c38f (patch) | |
| tree | 82cb3a251b7b280d9f2c04805dbd542d41bd5e89 /compiler/rustc_errors/src | |
| parent | 7d046551a77238f00b6869879c4edbed40c3ac02 (diff) | |
| parent | a2f275da511bbe03ca53bb4c90a344340b1c8fff (diff) | |
| download | rust-637d9ddc35552a3ccc163efc5df2fc7af642c38f.tar.gz rust-637d9ddc35552a3ccc163efc5df2fc7af642c38f.zip | |
Rollup merge of #110578 - bvanjoi:fix-issue-110547, r=jackh726
fix(error): normalize whitespace during msg_to_buffer close https://github.com/rust-lang/rust/issues/110547
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 8c76d5e010f..2498ae2b7bc 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -1336,6 +1336,7 @@ impl EmitterWriter { // see? for (text, style) in msg.iter() { let text = self.translate_message(text, args).map_err(Report::new).unwrap(); + let text = &normalize_whitespace(&text); let lines = text.split('\n').collect::<Vec<_>>(); if lines.len() > 1 { for (i, line) in lines.iter().enumerate() { |
