rust/library/core/src
许杰友 Jieyou Xu (Joe) 2d3b1e014b
Rollup merge of #124251 - scottmcm:unop-ptr-metadata, r=oli-obk
Add an intrinsic for `ptr::metadata`

The follow-up to #123840, so we can remove `PtrComponents` and `PtrRepr` from libcore entirely (well, after a bootstrap update).

As discussed in <https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/.60ptr_metadata.60.20in.20MIR/near/435637808>, this introduces `UnOp::PtrMetadata` taking a raw pointer and returning the associated metadata value.

By no longer going through a `union`, this should also help future PRs better optimize pointer operations.

r? ``@oli-obk``
2024-05-29 03:25:07 +01:00
..
alloc alloc::Layout: explicitly document size invariant on the type level 2024-03-25 20:18:46 +01:00
array Implement BOXED_SLICE_INTO_ITER 2024-05-20 19:21:30 -04:00
ascii implement Default for AsciiChar 2024-02-13 12:04:44 +01:00
async_iter Hide async_gen_internals from standard library documentation 2024-04-05 18:54:38 -07:00
cell update tracking issue for lazy_cell_consume 2024-05-28 11:02:03 +02:00
char Improve escape methods. 2024-05-09 17:04:30 +02:00
cmp Use generic NonZero everywhere in core. 2024-02-22 15:17:33 +01:00
convert Re-add From<f16> for f64 2024-05-04 22:56:35 +01:00
ffi Fix c_char on AIX 2024-05-20 22:46:13 +09:00
fmt Move the checks for Arguments constructors to inline const 2024-05-24 21:09:15 -04:00
future Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
hash Add fn const BuildHasherDefault::new 2024-03-29 17:10:17 +01:00
intrinsics Add custom mir support for PtrMetadata 2024-05-28 09:28:51 -07:00
io Remove bound checks from BorrowedBuf and BorrowedCursor methods 2024-04-15 10:29:43 +02:00
iter Implement BOXED_SLICE_INTO_ITER 2024-05-20 19:21:30 -04:00
macros Workaround rustfmt bug replacing type ascription 2024-05-01 23:23:00 -04:00
mem Fix typo in ManuallyDrop's documentation 2024-05-10 23:13:32 +00:00
net Stabilise ip_bits feature 2024-05-25 15:00:59 -04:00
num Rollup merge of #125559 - scottmcm:simplify-shift-ubcheck, r=workingjubilee 2024-05-26 15:28:28 -07:00
ops Add assert_unsafe_precondition to unchecked_{add,sub,neg,mul,shl,shr} methods 2024-05-23 21:02:31 -04:00
panic Replace version placeholders for 1.79 2024-05-01 21:01:51 -04:00
prelude Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
ptr Rollup merge of #124251 - scottmcm:unop-ptr-metadata, r=oli-obk 2024-05-29 03:25:07 +01:00
slice Stabilize slice_flatten 2024-05-26 01:26:24 -04:00
str Always use the general case char count 2024-05-27 12:05:00 +02:00
sync Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
task Wrap Context.ext in AssertUnwindSafe 2024-05-21 19:05:37 -07:00
unicode Add a lower bound check to unicode-table-generator output 2024-04-20 10:16:45 +02:00
any.rs Improve wording in std::any explanation 2024-03-29 10:10:52 -07:00
arch.rs Rust is a proper name: rust → Rust 2024-03-07 07:49:22 +01:00
ascii.rs Improve escape methods. 2024-05-09 17:04:30 +02:00
asserting.rs [RFC 2011] Library code 2022-05-22 07:18:32 -03:00
bool.rs core is now compilable 2023-04-16 07:20:26 +00:00
borrow.rs doc: replace wrong punctuation mark 2023-07-28 14:46:17 +02:00
cell.rs Rollup merge of #123480 - Nadrieril:impl-all-derefpures, r=compiler-errors 2024-05-03 06:04:19 +02:00
clone.rs Revert "Put basic impls for f16 and f128 behind cfg(not(bootstrap))" 2024-04-10 13:50:27 -04:00
cmp.rs Make clamp inline 2024-05-23 18:45:03 +02:00
default.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
error.md Fix minor grammar typo 2023-09-06 09:47:22 -07:00
error.rs style library/core/src/error.rs 2024-03-02 16:03:23 +08:00
escape.rs Improve escape methods. 2024-05-09 17:04:30 +02:00
hint.rs Add support for Arm64EC to the Standard Library 2024-04-15 16:05:16 -07:00
internal_macros.rs core: actually use TAIT instead of emulating it 2024-05-21 15:59:48 +02:00
intrinsics.rs Add an intrinsic for ptr::metadata 2024-05-28 09:28:51 -07: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 #125551 - clarfonthey:ip-bits, r=jhpratt 2024-05-28 02:07:48 -07:00
marker.rs Revert "Put basic impls for f16 and f128 behind cfg(not(bootstrap))" 2024-04-10 13:50:27 -04:00
option.rs It seems that anchor names are implicitly all lowercase 2024-05-25 17:44:48 -06:00
panic.rs panic_str only exists for the migration to 2021 panic macros 2024-03-26 08:11:34 +01:00
panicking.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
pat.rs Add pattern types to parser 2024-04-08 11:57:17 +00:00
pin.rs Rollup merge of #123480 - Nadrieril:impl-all-derefpures, r=compiler-errors 2024-05-03 06:04:19 +02:00
primitive_docs.rs Rollup merge of #125043 - RalfJung:ref-type-safety-invariant, r=scottmcm 2024-05-22 23:41:11 +02:00
primitive.rs
result.rs Rollup merge of #124870 - Lokathor:update-result-docs, r=dtolnay 2024-05-27 13:10:33 +02:00
time.rs Rollup merge of #124667 - newpavlov:stabilize_div_duration, r=jhpratt 2024-05-25 22:15:18 +02:00
tuple.rs Rollup merge of #118307 - scottmcm:tuple-eq-simpler, r=joshtriplett 2024-02-11 08:25:41 +01:00
ub_checks.rs export assert_unsafe_precondition macro for std-internal use 2024-04-22 19:02:37 +02:00
unit.rs Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00