1
Fork 0

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
This commit is contained in:
Martin Nordholts 2023-12-12 16:47:32 +01:00
parent 1559dd2dbf
commit d46df80c73
4 changed files with 16 additions and 12 deletions

View file

@ -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 });