rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.97k stars 12.69k forks source link

Implicit panic calls not collected during monomorphization #90405

Closed nbdd0121 closed 2 years ago

nbdd0121 commented 2 years ago

Implicit panic calls can be generated from Assert MIR terminator, but they are not collected during monomorphization. This means that link error will occur if the panic functions are not codegenned with core crate, e.g. when it is marked inline.

This causes breakage in rust-lang/cargo#10019 when #90273 changes the function to be inline if panic_immediate_abort is set and exposes this issue.

nbdd0121 commented 2 years ago

@rustbot label: T-compiler A-codegen @rustbot claim