rust/src/tools
bors faae5f1ffe Auto merge of #122520 - scottmcm:stabilize_unchecked_math_basics, r=jhpratt
Stabilize `unchecked_{add,sub,mul}`

Tracking issue: #85122

I think we might as well just stabilize these basic three.  They're the ones that have `nuw`/`nsw` flags in LLVM.

Notably, this doesn't include the potentially-more-complex or -more-situational things like `unchecked_neg` or `unchecked_shr` that are under different feature flags.

To quote Ralf https://github.com/rust-lang/rust/issues/85122#issuecomment-1681669646,

> Are there any objections to stabilizing at least `unchecked_{add,sub,mul}`? For those there shouldn't be any surprises about what their safety requirements are.

*Semantially* these are [already available on stable, even in `const`, via](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=bdb1ff889b61950897f1e9f56d0c9a36) `checked_*`+`unreachable_unchecked`.  So IMHO we might as well just let people write them directly, rather than try to go through a `let Some(x) = x.checked_add(y) else { unsafe { hint::unreachable_unchecked() }};` dance.

I added additional text to each method to attempt to better describe the behaviour and encourage `wrapping_*` instead.

r? rust-lang/libs-api
2024-03-29 20:25:08 +00:00
..
build-manifest Add bare metal riscv32 target. 2024-03-20 16:02:10 +01:00
build_helper Do not try to format removed files 2024-03-05 15:07:41 +00:00
bump-stage0 make x.py clippy download and use beta clippy 2023-12-16 15:24:59 -05:00
cargo@499a61ce7a Update cargo 2024-03-26 00:06:06 -06:00
cargotest Don't ask for a specific branch in cargotest 2023-12-04 12:11:44 +02:00
clippy Implement mut ref/mut ref mut 2024-03-27 09:53:23 -04:00
collect-license-metadata Fix generate-copyright tool. 2023-11-27 11:03:53 +00:00
compiletest Convert wasmtime check into a compiletest needs directive 2024-03-27 22:15:49 +00:00
coverage-dump Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
error_index_generator Stop using String for error codes. 2024-01-29 07:41:41 +11:00
expand-yaml-anchors Run expand-yaml-anchors in x test tidy 2023-02-05 14:46:52 -06:00
generate-copyright Fix generate-copyright tool. 2023-11-27 11:03:53 +00:00
generate-windows-sys Bump windows-bindgen to 0.55.0 2024-03-12 16:05:58 +00:00
html-checker
jsondocck jsondocck: bump jsonpath to 0.3, dropping few dup dependencies 2023-11-18 12:56:54 +03:00
jsondoclint Fix bootstrap bump fallout 2024-03-20 08:49:13 -04:00
linkchecker Switch linkchecker to use html5ever for html parsing. 2024-02-08 14:23:40 -08:00
lint-docs Split refining_impl_trait lint into _reachable, _internal variants 2024-03-05 16:19:16 -08:00
lld-wrapper linker: Remove -Zgcc-ld option 2023-10-08 10:05:25 +03:00
llvm-bitcode-linker LLVM Bitcode Linker: Added crate 2024-03-11 13:35:35 +01:00
miri Auto merge of #122520 - scottmcm:stabilize_unchecked_math_basics, r=jhpratt 2024-03-29 20:25:08 +00:00
miropt-test-tools tidy: wrap regexes with lazy_static 2024-02-17 12:29:05 +03:00
opt-dist Auto merge of #119418 - aaupov:master, r=Kobzol 2024-03-16 11:18:39 +00:00
remote-test-client use u64 to represent file size 2024-01-21 18:16:22 +03:00
remote-test-server use u64 to represent file size 2024-01-21 18:16:22 +03:00
replace-version-placeholder Only depend on CFG_VERSION in rustc_interface 2023-05-17 23:54:21 -05:00
rls Don't use serde-derive in the rls shim 2023-07-10 14:53:57 -07:00
run-make-support Rework rmake support library to have a weakly-typed API with helper methods 2024-03-24 15:37:24 +00:00
rust-analyzer Merge commit '5ecace48f6' into sync-from-ra 2024-03-17 11:04:52 +02:00
rust-demangler
rust-installer support no-op compression profile in rust-installer 2024-02-22 01:35:57 +03:00
rustbook dedupe env_logger, drop is-terminal 2024-02-22 14:35:21 +03:00
rustdoc rustdoc: Use unix_sigpipe instead of rustc_driver::set_sigpipe_handler 2022-10-24 20:40:46 +02:00
rustdoc-gui Improve display of parallel jobs in rustdoc-gui tester script 2023-10-16 20:16:08 +02:00
rustdoc-gui-test Make try_run return a Result<(), ()> instead of a boolean 2023-06-23 17:07:34 +02:00
rustdoc-js rustdoc-search: remove parallel searchWords array 2023-12-15 16:26:35 -07:00
rustdoc-themes Ensure build/tmp exists in rustdoc_themes::get_themes 2023-09-20 08:31:33 +02:00
rustfmt Add rustfmt test for mut ref mut 2024-03-27 16:38:56 -04:00
suggest-tests Suggest pattern tests when modifying exhaustiveness 2024-02-08 01:51:12 +01:00
tidy Add FIXME to remind removing the check once all tests are ported over 2024-03-27 21:31:56 +00:00
tier-check Encourage developers not to use periods in target names 2022-11-17 10:41:41 +01:00
unicode-table-generator remove some unneeded imports 2023-04-12 19:27:18 +02:00
unstable-book-gen
x Add other workspaces to linkedProjects in rust_analyzer_settings.json 2023-05-26 12:08:58 -05:00
cherry-pick.sh
publish_toolstate.py Apply changes to fix python linting errors 2023-06-16 20:56:01 -04:00