Files
rust/compiler/rustc_hir_analysis
Jacob Pratt d831599f3a Rollup merge of #151377 - xonx4l:main_termination, r=lcnr
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.
2026-04-09 23:59:58 -04:00
..

For high-level intro to how type checking works in rustc, see the hir typeck chapter of the rustc dev guide.