rust/tests
Trevor Gross fcb9da597a
Rollup merge of #137280 - RalfJung:const_swap_nonoverlapping, r=lcnr
stabilize ptr::swap_nonoverlapping in const

Closes https://github.com/rust-lang/rust/issues/133668

The blocking issue mentioned there is resolved by documentation. We may in the future actually support such code, but that is blocked on https://github.com/rust-lang/const-eval/issues/72 which is non-trivial to implement. Meanwhile, this completes stabilization of all `const fn` in `ptr`. :)

Here's a version of the problematic example to play around with:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=6c390452379fb593e109b8f8ee854d2a

Should be FCP'd with both `@rust-lang/libs-api`  and `@rust-lang/lang`  since  `swap_nonoverlapping` is documented to work as an "untyped" operation but due to the limitation mentioned above, that's not entirely true during const evaluation. I expect this limitation will only be hit in niche corner cases, so the benefits of having this function work most of the time outweigh the downsides of users running into this problem. (Note that unsafe code could already hit this limitation before this PR by doing cursed pointer casts, but having it hidden inside `swap_nonoverlapping` feels a bit different.)
2025-05-04 18:11:47 -04:00
..
assembly Rollup merge of #140194 - jieyouxu:minicore-force-unwind-tables, r=bjorn3 2025-04-24 11:40:42 +02:00
auxiliary stabilize naked_functions 2025-04-20 11:18:38 +02:00
codegen Rollup merge of #140456 - fneddy:fix_s390x_codegen_simd_ext_ins_dyn, r=wesleywiser 2025-05-04 13:21:08 +10:00
codegen-units
coverage Update the minimum external LLVM to 19 2025-04-05 11:44:38 -07:00
coverage-run-rustdoc Update coverage-run-rustdoc output 2025-03-28 10:35:53 +01:00
crashes Auto merge of #140549 - BoxyUwU:proper_const_norm, r=lcnr 2025-05-04 03:12:41 +00:00
debuginfo Rollup merge of #138599 - adwinwhite:recursive-overflow, r=wesleywiser 2025-04-18 05:17:53 +02:00
incremental compiletest: Do not require annotations on empty labels and suggestions 2025-05-03 22:49:23 +03:00
mir-opt Bless mir opt tests. 2025-05-01 12:29:43 +02:00
pretty Improve hir pretty-printing of attributes. 2025-05-03 12:46:48 +10:00
run-make Workaround for windows-gnu rust-lld test failure 2025-04-28 23:25:10 +00:00
rustdoc Rollup merge of #137096 - ehuss:stabilize-doctest-xcompile, r=fmease 2025-04-25 00:53:58 +02:00
rustdoc-gui Add/update GUI test for impl indent fix 2025-04-24 12:33:29 +02:00
rustdoc-js rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustdoc-js-std rustdoc-search: add unbox flag to Result aliases 2025-04-11 11:36:40 -07:00
rustdoc-json Improve hir pretty-printing of attributes. 2025-05-03 12:46:48 +10:00
rustdoc-ui Rollup merge of #140420 - fmease:rustdoc-fix-doctest-heur, r=GuillaumeGomez 2025-05-01 22:27:23 +02:00
ui Rollup merge of #137280 - RalfJung:const_swap_nonoverlapping, r=lcnr 2025-05-04 18:11:47 -04:00
ui-fulldeps Improve hir pretty-printing of attributes. 2025-05-03 12:46:48 +10:00
COMPILER_TESTS.md