about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/assert_module_sources.rs
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2023-12-12 16:47:32 +0100
committerMartin Nordholts <martin.nordholts@codetale.se>2023-12-19 20:20:40 +0100
commitd46df80c73aefdbad1a872337c3708f51ff3c376 (patch)
treecf70259851380c2c07c9c3bcea51d7d83de0f56d /compiler/rustc_codegen_ssa/src/assert_module_sources.rs
parent1559dd2dbfd42e72ac05b1d23b85ce5ed63f900b (diff)
downloadrust-d46df80c73aefdbad1a872337c3708f51ff3c376.tar.gz
rust-d46df80c73aefdbad1a872337c3708f51ff3c376.zip
rustc_codegen_ssa: Don't let `IncorrectCguReuseType` errors get lost
In [100753], `IncorrectCguReuseType` accidentally stopped being emitted.
Begin emitting it again rather than just blindly dropping it, and adjust
tests accordingly.

[100753]: https://github.com/rust-lang/rust/pull/100753/commits/706452eba74026c51e8d0fa30aee2497c69eafc0#diff-048389738ddcbe0f9765291a29db1fed9a5f03693d4781cfb5aaa97ffb3c7f84
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 01d1b1059b9..a5bd10ecb34 100644
--- a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs
+++ b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs
@@ -278,13 +278,13 @@ impl CguReuseTracker {
 
                     if error {
                         let at_least = if at_least { 1 } else { 0 };
-                        errors::IncorrectCguReuseType {
+                        sess.emit_err(errors::IncorrectCguReuseType {
                             span: *error_span,
                             cgu_user_name,
                             actual_reuse,
                             expected_reuse,
                             at_least,
-                        };
+                        });
                     }
                 } else {
                     sess.emit_fatal(errors::CguNotRecorded { cgu_user_name, cgu_name });