about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/assert_module_sources.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-12-14 20:33:11 +0100
committerGitHub <noreply@github.com>2023-12-14 20:33:11 +0100
commit4d016c781a62be658f11f57d8be4b95a2c63257d (patch)
treed8cb9bdeb07a99a32b5be9355586bd6453f7885e /compiler/rustc_codegen_ssa/src/assert_module_sources.rs
parent49a2fc22e9186b414a8da18af94fe6ebb0a00462 (diff)
parent2ddd8b4f190822ab4805bae7008264eb118ba748 (diff)
Rollup merge of #118945 - Enselic:remove-trailing, r=compiler-errors
rustc_codegen_ssa: Remove trailing spaces in Display impl for CguReuse

Otherwise errors will look like this:

    error: CGU-reuse for `cgu_invalidated_via_import-bar` is `PreLto ` but should be `PostLto `

### Background

I noticed that error messages looked wonky while investigating if
https://github.com/rust-lang/rust/blob/529047cfc3f4f7b3ea5aaac054408f368d153727/compiler/rustc_codegen_ssa/src/assert_module_sources.rs#L281-L287
should not be wrapped by `sess.emit_err(...)`. Right now it looks like the error is accidentally ignored. It looks like https://github.com/rust-lang/rust/pull/100753/commits/706452eba74026c51e8d0fa30aee2497c69eafc0 might have accidentally started ignoring it (by removing the `diag.span_err()` call). I am still investigating, but regardless of the outcome we should fix the trailing whitespace.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/assert_module_sources.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/assert_module_sources.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs
index 3d479c5c22d..01d1b1059b9 100644
--- a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs
+++ b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs
@@ -199,8 +199,8 @@ impl fmt::Display for CguReuse {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match *self {
             CguReuse::No => write!(f, "No"),
-            CguReuse::PreLto => write!(f, "PreLto "),
-            CguReuse::PostLto => write!(f, "PostLto "),
+            CguReuse::PreLto => write!(f, "PreLto"),
+            CguReuse::PostLto => write!(f, "PostLto"),
         }
     }
 }