rust/compiler/rustc_hir_analysis
Celina G. Val b9754f9e7b Enable contracts for const functions
Use `const_eval_select!()` macro to enable contract checking only at
runtime. The existing contract logic relies on closures,
which are not supported in constant functions.

This commit also removes one level of indirection for ensures clauses,
however, it currently has a spurious warning message when the bottom
of the function is unreachable.
2025-04-07 11:17:33 -07:00
..
2025-04-07 11:17:33 -07:00

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