about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-04-15 15:47:24 +1000
committerGitHub <noreply@github.com>2025-04-15 15:47:24 +1000
commit380ad1b5d45a3f769cecf669bbc95309dd5291ea (patch)
tree7b287c4a1201adf994643dff90c878e973e43d09 /compiler/rustc_codegen_llvm/src/errors.rs
parent2da29dbe8fe23df1c7c4ab1d8740ca3c32b15526 (diff)
parent13f1c845840fa40135fbed8798ec42df4d93b5d3 (diff)
downloadrust-380ad1b5d45a3f769cecf669bbc95309dd5291ea.tar.gz
rust-380ad1b5d45a3f769cecf669bbc95309dd5291ea.zip
Rollup merge of #138374 - celinval:issue-136925-const-contract, r=compiler-errors,oli-obk,RalfJung
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 since we no longer build a closure around the ensures predicate.

Resolves #136925

**Call-out:** This is still a draft PR since CI is broken due to a new warning message for unreachable code when the bottom of the function is indeed unreachable. It's not clear to me why the warning wasn't triggered before.

r? ```@compiler-errors```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions