rust/library/core
Matthias Krüger 67fcb58347
Rollup merge of #128453 - RalfJung:raw_eq, r=saethlin
raw_eq: using it on bytes with provenance is not UB (outside const-eval)

The current behavior of raw_eq violates provenance monotonicity. See https://github.com/rust-lang/rust/pull/124921 for an explanation of provenance monotonicity. It is violated in raw_eq because comparing bytes without provenance is well-defined, but adding provenance makes the operation UB.

So remove the no-provenance requirement from raw_eq. However, the requirement stays in-place for compile-time invocations of raw_eq, that indeed cannot deal with provenance.

Cc `@rust-lang/opsem`
2024-08-02 06:43:43 +02:00
..
benches Reformat use declarations. 2024-07-29 08:26:52 +10:00
src Rollup merge of #128453 - RalfJung:raw_eq, r=saethlin 2024-08-02 06:43:43 +02:00
tests Stabilize offset_of_nested 2024-07-29 17:50:12 +01:00
Cargo.toml Cleanup bootstrap check-cfg 2024-06-27 11:30:03 +02:00