mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-31 21:16:44 +00:00
Normalize main return type during mono item collection & codegen
The issue can be observed with `-Zprint-mono-items=lazy` in:
```rust
#![feature(termination_trait_lib)]
fn main() -> impl std::process::Termination { }
```
```
BEFORE: MONO_ITEM fn std::rt::lang_start::<impl std::process::Termination> ````@@```` t.93933fa2-cgu.2[External]
AFTER: MONO_ITEM fn std::rt::lang_start::<()> ````@@```` t.df56e625-cgu.1[External]
```
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.