diff options
| author | bors <bors@rust-lang.org> | 2024-03-10 01:23:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-10 01:23:54 +0000 |
| commit | 768408af123a455fb27ad8af8055becd5b95d36f (patch) | |
| tree | 488abcb703217d6b2461ccaa220b0be424e6c804 /compiler/rustc_codegen_llvm/src | |
| parent | 2d24fe591f30386d6d5fc2bb941c78d7266bf10f (diff) | |
| parent | 2a1f97f77ff2a6f6e27aae983420f4ee57056527 (diff) | |
| download | rust-768408af123a455fb27ad8af8055becd5b95d36f.tar.gz rust-768408af123a455fb27ad8af8055becd5b95d36f.zip | |
Auto merge of #121662 - saethlin:precondition-unification, r=RalfJung
Distinguish between library and lang UB in assert_unsafe_precondition As described in https://github.com/rust-lang/rust/pull/121583#issuecomment-1963168186, `assert_unsafe_precondition` now explicitly distinguishes between language UB (conditions we explicitly optimize on) and library UB (things we document you shouldn't do, and maybe some library internals assume you don't do). `debug_assert_nounwind` was originally added to avoid the "only at runtime" aspect of `assert_unsafe_precondition`. Since then the difference between the macros has gotten muddied. This totally revamps the situation. Now _all_ preconditions shall be checked with `assert_unsafe_precondition`. If you have a precondition that's only checkable at runtime, do a `const_eval_select` hack, as done in this PR. r? RalfJung
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
