diff options
| author | Urgau <urgau@numericable.fr> | 2023-09-03 17:10:42 +0200 |
|---|---|---|
| committer | Urgau <urgau@numericable.fr> | 2023-09-03 17:10:42 +0200 |
| commit | ec0975dd6bdd2afb2cbe3373ba3da98ec8ef453b (patch) | |
| tree | 4828d956b0688ecac4e5638e250e6ed527152650 /compiler/rustc_errors/src | |
| parent | 9bd60a60cefdddca1f507083dda37e1664b295c5 (diff) | |
| download | rust-ec0975dd6bdd2afb2cbe3373ba3da98ec8ef453b.tar.gz rust-ec0975dd6bdd2afb2cbe3373ba3da98ec8ef453b.zip | |
Don't forget to normalize the translated message
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/emitter.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 0cae06881b1..fd8c283bde4 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -2346,7 +2346,13 @@ impl FileWithAnnotatedLines { } let label = label.as_ref().map(|m| { - emitter.translate_message(m, args).map_err(Report::new).unwrap().to_string() + normalize_whitespace( + &emitter + .translate_message(m, &args) + .map_err(Report::new) + .unwrap() + .to_string(), + ) }); if lo.line != hi.line { |
