diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2024-12-24 14:05:22 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-24 14:05:22 +1100 |
| commit | bbd30b54768555c2fabe3d71d6949ed2d40752f3 (patch) | |
| tree | c6ec8b714352ad15214a445c6d637901bb200a33 /tests/ui | |
| parent | 0c93b279ea23a1fc83b72d12f15f37e4946f5876 (diff) | |
| parent | af1c8da172a9d9d18af4a7e1c59bfecd2f051111 (diff) | |
| download | rust-bbd30b54768555c2fabe3d71d6949ed2d40752f3.tar.gz rust-bbd30b54768555c2fabe3d71d6949ed2d40752f3.zip | |
Rollup merge of #134689 - RalfJung:ptr-swap-test, r=oli-obk
core: fix const ptr::swap_nonoverlapping when there are pointers at odd offsets Ensure that the pointer gets swapped correctly even if it is not stored at an aligned offset. This rules out implementations that copy things in a `usize` loop -- so our implementation needs to be adjusted to avoid such a loop when running in const context. Part of https://github.com/rust-lang/rust/issues/133668
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/consts/missing_span_in_backtrace.stderr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ui/consts/missing_span_in_backtrace.stderr b/tests/ui/consts/missing_span_in_backtrace.stderr index 72d15702e89..05ae7305dbc 100644 --- a/tests/ui/consts/missing_span_in_backtrace.stderr +++ b/tests/ui/consts/missing_span_in_backtrace.stderr @@ -7,6 +7,8 @@ note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>` --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL note: inside `std::ptr::swap_nonoverlapping_simple_untyped::<MaybeUninit<u8>>` --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL +note: inside `swap_nonoverlapping::compiletime::<MaybeUninit<u8>>` + --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL note: inside `swap_nonoverlapping::<MaybeUninit<u8>>` --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL note: inside `X` @@ -20,6 +22,7 @@ note: inside `X` | |_________^ = help: this code performed an operation that depends on the underlying bytes representing a pointer = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported + = note: this error originates in the macro `$crate::intrinsics::const_eval_select` which comes from the expansion of the macro `const_eval_select` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to 1 previous error |
