diff options
| author | bohan <bohan-zhang@foxmail.com> | 2023-04-20 13:24:45 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2023-04-21 08:40:00 +0800 |
| commit | a2f275da511bbe03ca53bb4c90a344340b1c8fff (patch) | |
| tree | 53d2f0068f5cbfc80b9cb71ee2cfe107c81ddc38 /compiler/rustc_errors/src | |
| parent | 7908a1d65496b88626e4b7c193c81d777005d6f3 (diff) | |
| download | rust-a2f275da511bbe03ca53bb4c90a344340b1c8fff.tar.gz rust-a2f275da511bbe03ca53bb4c90a344340b1c8fff.zip | |
fix(error): normalize whitespace during msg_to_buffer
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 fe44799efdb..cb3365f0c40 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() { |
