rust/library/core/src
Jacob Pratt 359c5047ab
Rollup merge of #136019 - scottmcm:alias-unchecked-div, r=Mark-Simulacrum
Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls

Inspired by https://github.com/rust-lang/libs-team/issues/526, if people are looking for `unchecked_div`, point them to `u32: Div<NonZero<u32>>` and friends which do no runtime checks -- and are safe! -- rather than today's behaviour of [the intrinsic being the top result](https://doc.rust-lang.org/std/?search=unchecked_div).

![image](https://github.com/user-attachments/assets/cf2a3c06-4876-49c1-8e33-64cd431c772a)
2025-01-26 01:51:18 -05:00
..
alloc Use NonNull::without_provenance within the standard library 2025-01-10 23:23:10 +01:00
array Rollup merge of #135489 - RalfJung:TryFromSliceError, r=tgross35 2025-01-24 08:08:06 +01:00
ascii Add more precondition check tests 2024-10-09 19:34:27 -04:00
async_iter Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
cell Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
char char to_digit: avoid unnecessary casts to u64 2024-12-31 16:17:10 +01:00
clone CloneToUninit: use a private specialization trait 2024-07-29 20:44:43 +03:00
cmp Use generic NonZero everywhere in core. 2024-02-22 15:17:33 +01:00
convert rustdoc-search: let From and Into be unboxed 2024-12-13 11:05:30 -07:00
ffi ports last few library files to new intrinsic style 2025-01-24 21:50:56 +05:30
fmt Fix FormattingOptions instantiation with Default 2025-01-24 01:58:33 -05:00
future update cfg(bootstrap) 2025-01-08 21:26:39 +01:00
hash fmt 2025-01-08 22:11:33 +01:00
intrinsics ports last few library files to new intrinsic style 2025-01-24 21:50:56 +05:30
io Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
iter Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
macros Rollup merge of #133720 - c410-f3r:cfg-match-foo-bar-baz, r=joshtriplett 2025-01-16 17:00:44 +01:00
mem Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
net Auto merge of #134286 - Urgau:unreach_pub-std, r=ibraheemdev 2025-01-20 23:34:04 +00:00
num Rollup merge of #136019 - scottmcm:alias-unchecked-div, r=Mark-Simulacrum 2025-01-26 01:51:18 -05:00
ops core: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
panic replace placeholder version 2024-11-27 12:10:21 +00:00
prelude update version placeholders 2025-01-08 20:02:18 +01:00
ptr Less unsafe in dangling/without_provenance 2025-01-15 22:17:57 -08:00
range Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
slice core: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
str chore: fix typos 2024-12-24 23:37:30 +08:00
sync Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
task update version placeholders 2025-01-08 20:02:18 +01:00
unicode core: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
any.rs Fixes safety docs for dyn Any + Send {+ Sync} 2024-12-22 21:38:23 +02:00
arch.rs core: #[allow(unreachable_pub)] on unreachable pub use 2025-01-20 18:35:32 +01:00
ascii.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
asserting.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
bool.rs Rollup merge of #133964 - joboet:select_unpredictable, r=tgross35 2025-01-04 09:54:36 +01:00
borrow.rs Suggest borrowing on fn argument that is impl AsRef 2024-05-09 23:25:31 +00:00
bstr.rs Add doc aliases for BStr and BString 2025-01-22 09:19:24 +02:00
cell.rs Correct counting to four in cell module docs 2025-01-20 10:16:27 +00:00
clone.rs Implement CloneToUninit for ByteStr 2025-01-22 17:53:39 +02:00
cmp.rs Remove qualification of std::cmp::Ordering in Ord doc 2024-12-31 14:29:03 -07:00
default.rs update cfgs 2024-09-05 17:24:01 +01:00
error.md Mention core's PanicInfo in error.md. 2024-06-11 15:47:00 +02:00
error.rs Update includes in '/library/core/src/error.rs'; 2024-12-13 12:46:20 +01:00
escape.rs core: add #![warn(unreachable_pub)] 2025-01-20 18:35:32 +01:00
hint.rs Rollup merge of #133695 - x17jiri:hint_likely, r=Amanieu 2025-01-20 20:58:34 +01:00
internal_macros.rs Fix doc nits 2024-07-26 13:26:33 +01:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Rollup merge of #135073 - joshtriplett:bstr, r=BurntSushi 2025-01-23 19:54:23 +01:00
marker.rs Enforce syntactical stability of const traits in HIR 2025-01-14 19:12:08 +00:00
option.rs Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
panic.rs update cfgs 2024-11-27 15:14:54 +00:00
panicking.rs update cfgs 2024-11-27 15:14:54 +00:00
pat.rs Rename core_pattern_type and core_pattern_types lib feature gates to pattern_type_macro 2024-12-04 16:16:24 +00:00
pin.rs docs: fix typo in std::pin overview 2025-01-24 23:26:02 -07:00
primitive.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
primitive_docs.rs Use &raw for ptr primitive docs 2024-12-21 15:47:44 -05:00
random.rs random: add tracking issue, address other comments 2024-09-23 10:36:16 +02:00
range.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
result.rs Less unwrap() in documentation 2024-12-21 01:26:47 +00:00
time.rs Update a bunch of library types for MCP807 2025-01-09 23:47:11 -08:00
tuple.rs update cfgs 2024-09-05 17:24:01 +01:00
ub_checks.rs update cfgs 2024-11-27 15:14:54 +00:00
unit.rs Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00
unsafe_binder.rs Add unwrap_unsafe_binder and wrap_unsafe_binder macro operators 2024-12-12 16:29:40 +00:00