rust/compiler/rustc_middle/src
bors 768408af12 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
2024-03-10 01:23:54 +00:00
..
dep_graph Reduce exposure of things. 2023-11-16 16:49:22 +11:00
hir Move visitor utils to rustc_ast_ir 2024-03-05 12:38:03 -05:00
hooks Rename hook. 2023-11-01 16:49:18 +00:00
infer add comment 2024-02-22 18:54:51 +01:00
middle Rename BuiltinLintDiagnostics as BuiltinLintDiag. 2024-03-05 12:15:10 +11:00
mir Distinguish between library and lang UB in assert_unsafe_precondition 2024-03-08 18:53:58 -05:00
query Auto merge of #122010 - oli-obk:intrinsics3.0, r=pnkfelix 2024-03-09 01:18:13 +00:00
thir Add asm label support to THIR 2024-02-24 18:49:39 +00:00
traits inspect formatter: add braces 2024-03-08 17:03:04 +01:00
ty Rollup merge of #122237 - fee1-dead-contrib:rmord, r=compiler-errors 2024-03-09 16:21:21 +01:00
util Convert bugs back to delayed_bugs. 2024-02-21 10:35:54 +11:00
arena.rs Rename some normalization-related items 2024-02-20 17:30:49 +01:00
error.rs Rename DiagnosticMessage as DiagMessage. 2024-03-05 12:14:49 +11:00
lib.rs Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errors 2024-02-23 17:02:03 +01:00
lint.rs Rename DiagnosticMessage as DiagMessage. 2024-03-05 12:14:49 +11:00
macros.rs Convert TypeVisitor and DefIdVisitor to use VisitorResult 2024-03-05 13:28:15 -05:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs Remove outdated references to librustc_middle. 2024-01-05 16:34:52 +00:00
thir.rs Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
values.rs Merge collect_mod_item_types query into check_well_formed 2024-03-07 14:26:31 +00:00