os-rust/library/core/src
Matthias Krüger c139dc6281
Rollup merge of #130046 - RalfJung:const_str_as_mut, r=dtolnay
str: make as_mut_ptr and as_bytes_mut unstably const

`@rust-lang/libs-api` the corresponding non-mutable methods are already const fn, so this seems pretty trivial. I hope this is small enough that it does not need an ACP? :)

I would like to get these stabilized ASAP because I want to avoid people doing `s.as_ptr().cast_mut()`, which is UB if they ever write to it, but is already const-stable.

TODO: create a tracking issue.
2024-09-07 23:30:14 +02:00
..
alloc Try to golf down the amount of code in Layout 2024-08-20 18:41:07 -04:00
array Fixed more typos in library/core 2024-08-31 14:57:38 +09:00
ascii Use assert_unsafe_precondition! in AsciiChar::digit_unchecked 2024-08-21 16:26:35 -04:00
async_iter Reformat use declarations. 2024-07-29 08:26:52 +10:00
cell Add const_cell_into_inner to OnceCell 2024-08-21 17:36:05 -05:00
char Remove stray dot in std::char::from_u32_unchecked documentation 2024-08-31 21:54:29 +02: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 Fix doc nits 2024-07-26 13:26:33 +01:00
ffi Port std library to RTEMS 2024-09-03 09:19:29 +02:00
fmt Fix elided_named_lifetimes in code 2024-08-31 15:35:41 +03:00
future Fixed more typos in library/core 2024-08-31 14:57:38 +09:00
hash Reformat use declarations. 2024-07-29 08:26:52 +10:00
intrinsics Fixed more typos in library/core 2024-08-31 14:57:38 +09:00
io Fix doc nits 2024-07-26 13:26:33 +01:00
iter Rollup merge of #129321 - krtab:float_sum, r=workingjubilee 2024-08-21 21:58:28 +02:00
macros Fixed more typos in library/core 2024-08-31 14:57:38 +09:00
mem chore: remove repetitive words 2024-09-02 19:02:28 +08:00
net Rollup merge of #128641 - Konippi:standardize-duplicate-processes-in-parser, r=scottmcm 2024-09-01 03:58:03 +02:00
num stabilize const_float_bits_conv 2024-09-01 12:38:59 +02:00
ops Rollup merge of #128954 - zachs18:fromresidual-no-default, r=scottmcm 2024-08-14 21:43:08 +08:00
panic Tweak some attributes to improve panic_immediate_abort 2024-08-25 14:52:53 -04:00
prelude Avoid comments that describe multiple use items. 2024-07-17 08:02:46 +10:00
ptr Rollup merge of #129653 - RalfJung:addr-of-read-only, r=scottmcm 2024-09-05 19:43:47 +02:00
range Reformat use declarations. 2024-07-29 08:26:52 +10:00
slice clarify language around non-null ptrs in slice::raw 2024-09-02 15:49:18 +02:00
str str: make as_mut_ptr and as_bytes_mut unstably const 2024-09-07 21:00:10 +02:00
sync compiler_fence documentation: emphasize synchronization, not reordering 2024-09-01 16:58:44 +02:00
task Add Waker::new and LocalWaker::new 2024-09-02 18:51:59 -06:00
unicode Use #[rustfmt::skip] on some use groups to prevent reordering. 2024-07-19 13:26:48 +10:00
any.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
arch.rs Add the sha512, sm3 and sm4 target features 2024-08-02 02:29:15 +05:30
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 core is now compilable 2023-04-16 07:20:26 +00:00
borrow.rs Suggest borrowing on fn argument that is impl AsRef 2024-05-09 23:25:31 +00:00
cell.rs New #[rustc_pub_transparent] attribute 2024-08-24 23:05:37 +03:00
clone.rs CloneToUninit: use a private specialization trait 2024-07-29 20:44:43 +03:00
cmp.rs Fix doc nits 2024-07-26 13:26:33 +01:00
default.rs Revert "Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix" 2024-08-03 07:57:31 -04:00
error.md Mention core's PanicInfo in error.md. 2024-06-11 15:47:00 +02:00
error.rs Remove cfg(test) from library/core 2024-08-25 20:04:26 -04:00
escape.rs Remove feature(effects) from the standard library 2024-06-21 09:23:24 +00:00
hint.rs add extra linebreaks so rustdoc can identify the first sentence 2024-09-01 14:22:50 -07:00
internal_macros.rs Fix doc nits 2024-07-26 13:26:33 +01:00
intrinsics.rs ub_checks intrinsics: fall back to cfg(ub_checks) 2024-08-25 13:15:48 +02: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 #129555 - RalfJung:const_float_bits_conv, r=dtolnay 2024-09-07 23:30:11 +02:00
marker.rs Update marker.rs 2024-09-03 12:29:23 -07:00
option.rs Rollup merge of #129086 - slanterns:is_none_or, r=dtolnay 2024-08-16 19:58:58 +02:00
panic.rs Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
panicking.rs apply #[optimize(size)] to #[cold] ones and part of the panick machinery 2024-08-14 20:50:04 +02:00
pat.rs Add tracking issue to core-pattern-type 2024-08-07 20:43:05 -04:00
pin.rs Fix Pin::set bounds regression 2024-08-27 16:32:46 -05:00
primitive.rs library/core/src/primitive.rs: small doc fix 2024-07-23 23:11:26 +03:00
primitive_docs.rs Rollup merge of #129793 - lolbinarycat:doc-missing-newlines, r=workingjubilee 2024-09-02 04:19:29 +02:00
range.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
result.rs Add a precondition check for Layout::from_size_align_unchecked 2024-08-19 17:18:17 -04:00
time.rs docs: add digit separators in Duration examples 2024-09-03 16:01:33 -07:00
tuple.rs rustdoc: clean up tuple <-> primitive conversion docs 2024-08-24 14:06:57 -07:00
ub_checks.rs Change assert_unsafe_precondition docs to refer to check_language_ub 2024-08-21 17:35:54 -04:00
unit.rs Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00