rust/library/core/src
Matthias Krüger 32d21cb0b2
Rollup merge of #146509 - RalfJung:res-opt-layout-guarantees, r=traviscross
Result/Option layout guarantee clarifications

- It seems worth spelling out that this guarantee allows particular transmutes.
- After the `Result` section was written, the `Option` section it referenced gained *more* guarantees, saying that `None` is represented as `[0u8; N]`. Those guarantees were not meant to apply to `Result`. Make the `Result` section more self-contained to make this more clear.
- "Type has no fields" is unclear since there is no general definition of what the fields of some arbitrary type are. Replace that by a more accurate description of the actual check implemented [here](e379c77586/compiler/rustc_lint/src/types.rs (L828-L838)).

r? `@traviscross`
2025-10-18 15:09:02 +02:00
..
alloc Clarify that UB will occur, not can/may in GlobalAlloc docs 2025-10-14 21:12:11 -04:00
array only call polymorphic array iter drop machinery when the type requires it 2025-10-05 21:03:30 +02:00
ascii assert_unsafe_precondition: fix some incorrect check_language_ub 2025-09-22 09:28:38 +02:00
async_iter clippy fix: markdown indentation for indented items after line break 2025-07-08 11:48:15 +00:00
bstr Constify conversion traits 2025-09-01 21:38:26 -04:00
cell Constify conversion traits 2025-09-01 21:38:26 -04:00
char optimization: Don't include ASCII characters in Unicode tables 2025-09-07 15:21:24 +02:00
clone CloneToUninit: use a private specialization trait 2024-07-29 20:44:43 +03:00
cmp clean up some old const trait impl syntax 2025-09-06 04:35:52 +02:00
convert Constify Eq, Ord, PartialOrd 2025-09-12 12:39:31 +03:00
ffi Library: Remove remaining private #[repr] workarounds 2025-09-27 17:09:01 +02:00
fmt Make fmt::Write a diagnostic item 2025-10-04 16:07:06 +02:00
future Address documentation issues identified with Future 2025-06-07 20:13:54 +01:00
hash Remove some unsized tuple impls now that we don't support unsizing tuples anymore 2025-07-02 14:17:54 +00:00
intrinsics Rollup merge of #144438 - dawidl022:contracts/guarded-lowering, r=oli-obk 2025-10-16 19:35:22 +02:00
io Rollup merge of #143829 - a1phyr:trim_borrowed_buf, r=ChrisDenton 2025-07-17 03:58:32 +02:00
iter Rollup merge of #147258 - hkBst:panic-last-repeat, r=scottmcm 2025-10-18 08:08:36 +02:00
macros Rollup merge of #145943 - dianne:format-args-assign-docs, r=joboet 2025-10-07 17:42:10 +02:00
marker phantom_variance_markers: fix identifier usage in macro 2025-06-22 16:06:25 -07:00
mem const mem::drop 2025-10-14 21:49:24 -04:00
net Update CURRENT_RUSTC_VERSION post-bump 2025-09-26 18:41:32 -04:00
num Rollup merge of #147666 - Kivooeo:full_mud_add-followup, r=scottmcm 2025-10-14 19:47:31 +02:00
ops move Reborrow to ops, fix fmt issues 2025-09-27 01:11:01 +03:00
os Library: Remove remaining private #[repr] workarounds 2025-09-27 17:09:01 +02:00
panic Rollup merge of #145664 - Darksonn:stab-file-with-nul, r=Mark-Simulacrum 2025-09-21 14:42:34 +10:00
pin Constify conversion traits 2025-09-01 21:38:26 -04:00
prelude Remove the From derive macro from prelude 2025-08-18 13:12:19 +02:00
ptr Rollup merge of #146187 - clarfonthey:const-drop-in-place, r=oli-obk 2025-10-14 19:47:28 +02:00
range change end to last 2025-09-08 22:07:43 -04:00
slice is_ascii on an empty string or slice returns true 2025-10-16 10:52:51 +02:00
str is_ascii on an empty string or slice returns true 2025-10-16 10:52:51 +02:00
sync Rollup merge of #146675 - Jules-Bertholet:sync-nonexclusive, r=Mark-Simulacrum 2025-09-28 18:13:12 +02:00
task Constify conversion traits 2025-09-01 21:38:26 -04:00
unicode Bump unicode printable to version 17.0.0 2025-09-09 15:01:47 +02:00
any.rs Update CURRENT_RUSTC_VERSION post-bump 2025-09-26 18:41:32 -04:00
arch.rs update version placeholders 2025-05-12 15:33:30 +02:00
ascii.rs add doc(alias("AsciiChar")) to core::ascii::Char 2025-06-20 11:11:51 -05:00
asserting.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
bool.rs Add methods for converting bool to Result<(), E> 2025-06-19 23:20:06 +02:00
borrow.rs clean up some old const trait impl syntax 2025-09-06 04:35:52 +02:00
cell.rs Rollup merge of #145685 - Qelxiros:cell_get_cloned, r=programmerjake,tgross35 2025-10-04 17:11:08 +02:00
clone.rs constify basic Clone impls 2025-10-06 08:39:41 -04:00
cmp.rs add [const] PartialEq bound to PartialOrd 2025-09-17 16:39:01 -05:00
contracts.rs Apply suggestions from code review 2025-04-10 16:32:56 -07:00
default.rs Fix typo in default.rs 2025-09-07 21:16:35 -07:00
error.md Mention core's PanicInfo in error.md. 2024-06-11 15:47:00 +02:00
error.rs Clarify Display for error should not include source 2025-09-24 20:02:35 +01:00
escape.rs Get rid of EscapeDebugInner. 2025-06-15 22:08:41 +02:00
hint.rs Rollup merge of #145174 - 197g:issue-145148-select-unpredictable-drop, r=joboet 2025-08-31 13:40:35 +02:00
internal_macros.rs Constify remaining operators 2025-08-10 01:11:45 -04: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 Remove cfg(bootstrap) for doc_cfg feature following #141925 2025-09-27 11:29:49 +02:00
marker.rs core: relax supertrait of Destruct 2025-10-15 09:40:44 +01:00
option.rs Revise Result/Option guarantee docs 2025-10-18 00:59:17 +00:00
panic.rs Revert "Partially outline code inside the panic! macro". 2025-08-12 12:52:39 +02:00
panicking.rs Clarify how to remediate the panic_immediate_abort error 2025-10-08 11:35:39 +02:00
pat.rs clean up some old const trait impl syntax 2025-09-06 04:35:52 +02:00
pin.rs Adjust error messages 2025-10-05 17:45:27 +00:00
primitive.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
primitive_docs.rs Avoid placing // FIXME comments inside doc code blocks 2025-07-25 22:02:09 -07:00
random.rs random: Provide a Distribution<T> trait 2025-07-11 10:21:34 -07:00
range.rs Constify Eq, Ord, PartialOrd 2025-09-12 12:39:31 +03:00
result.rs Revise Result/Option guarantee docs 2025-10-18 00:59:17 +00:00
time.rs Update CURRENT_RUSTC_VERSION post-bump 2025-09-26 18:41:32 -04:00
tuple.rs add CloneFromCell and Cell::get_cloned 2025-10-01 18:47:09 -04:00
ub_checks.rs assert_unsafe_precondition: fix some incorrect check_language_ub 2025-09-22 09:28:38 +02:00
unit.rs core: Make Debug impl of raw pointers print metadata if present 2025-02-15 17:27:55 +01:00
unsafe_binder.rs Add unwrap_unsafe_binder and wrap_unsafe_binder macro operators 2024-12-12 16:29:40 +00:00
wtf8.rs Implement Debug for EncodeWide 2025-09-16 13:11:34 -06:00