rust/src/test
bors 704e47f78b Auto merge of #78407 - oli-obk:ub_checkable_ctfe, r=RalfJung,pnkfelix
Make CTFE able to check for UB...

... by not doing any optimizations on the `const fn` MIR used in CTFE. This means we duplicate all `const fn`'s MIR now, once for CTFE, once for runtime. This PR is for checking the perf effect, so we have some data when talking about https://github.com/rust-lang/const-eval/blob/master/rfcs/0000-const-ub.md

To do this, we now have two queries for obtaining mir: `optimized_mir` and `mir_for_ctfe`. It is now illegal to invoke `optimized_mir` to obtain the MIR of a const/static item's initializer, an array length, an inline const expression or an enum discriminant initializer. For `const fn`, both `optimized_mir` and `mir_for_ctfe` work, the former returning the MIR that LLVM should use if the function is called at runtime. Similarly it is illegal to invoke `mir_for_ctfe` on regular functions.

This is all checked via appropriate assertions and I don't think it is easy to get wrong, as there should be no `mir_for_ctfe` calls outside the const evaluator or metadata encoding. Almost all rustc devs should keep using `optimized_mir` (or `instance_mir` for that matter).
2021-01-12 17:26:56 +00:00
..
assembly Add wasm32 support to inline asm 2020-12-01 12:18:21 -06:00
auxiliary
codegen Merge remote-tracking branch 'origin/master' into frewsxcv-san 2020-12-31 23:27:33 -05:00
codegen-units
debuginfo Improvements to NatVis support 2020-12-28 12:14:49 -08:00
incremental Auto merge of #76896 - spastorino:codegen-inline-fns2, r=davidtwco,wesleywiser 2021-01-08 15:21:45 +00:00
mir-opt Keep an unoptimized duplicate of const fn around 2021-01-04 21:40:38 +00:00
pretty Rename optin_builtin_traits to auto_traits 2020-11-23 14:14:06 -08:00
run-make --emit=mir now emits both mir_for_ctfe and optimized_mir for const fn 2021-01-11 17:24:41 +00:00
run-make-fulldeps Auto merge of #76896 - spastorino:codegen-inline-fns2, r=davidtwco,wesleywiser 2021-01-08 15:21:45 +00:00
run-pass-valgrind Drop support for cloudabi targets 2020-11-22 17:11:41 -05:00
rustdoc Rollup merge of #80885 - camelid:intra-doc-str-ref, r=jyn514 2021-01-12 07:59:15 +09:00
rustdoc-js Add more rustdoc-js test cases 2020-12-03 14:11:37 -08:00
rustdoc-js-std
rustdoc-json Use true ID for def_id. 2020-12-05 22:38:57 +00:00
rustdoc-ui Auto merge of #80653 - jryans:doc-deref-recursive, r=jyn514,GuillaumeGomez 2021-01-08 12:34:20 +00:00
rustfix
ui Auto merge of #78407 - oli-obk:ub_checkable_ctfe, r=RalfJung,pnkfelix 2021-01-12 17:26:56 +00:00
ui-fulldeps Remove compile-fail test suite 2020-12-29 23:39:56 +03:00
COMPILER_TESTS.md