mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-29 23:15:29 +00:00
Refactor contract HIR lowering to ensure no contract code is executed when contract-checks are disabled. The call to contract_checks is moved to inside the lowered fn body, and contract closures are built conditionally, ensuring no side-effects present in contracts occur when those are disabled.
For more information about how rustc works, see the rustc dev guide.