mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
d831599f3a
Fix linker error by resolving regions for main return type obligations This PR fix linker error by resolving regions for main return type obligations as discussed in https://github.com/rust-lang/rust/issues/148421 Added a final check . Now the compiler double-checks the lifetimes for main right away. If they don't work it stops and gives the user a clean compiler error instead of a linker crash. Fixes https://github.com/rust-lang/rust/issues/148421.
For high-level intro to how type checking works in rustc, see the hir typeck chapter of the rustc dev guide.