Skip to content

Rollup of 8 pull requests #134822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
526d298
ptr::copy: fix docs for the overlapping case
RalfJung Dec 21, 2024
1e3ecd5
Windows: Use WriteFile to write to a UTF-8 console
ChrisDenton Dec 13, 2024
16a4ad7
rustdoc: use shorter paths as preferred canonical paths
notriddle Dec 26, 2024
da1c1c3
Adjust test for slightly changed inlining behavior
notriddle Dec 26, 2024
d997bc9
Simplify or delete normalize directives that don't care about bit-width
Zalathar Dec 25, 2024
2855098
Sort triples by name in platform_support.md
9names Dec 27, 2024
c5e4b72
tools: fix build failure caused by PR #134420
Integral-Tech Dec 27, 2024
5ba0dd4
Don't use `parse_cfg_name_directive` for normalize directives
Zalathar Dec 25, 2024
835fbcb
Remove the `-test` suffix from normalize directives
Zalathar Dec 25, 2024
0af396f
Fix mistake in windows file open
ChrisDenton Dec 24, 2024
454c09e
Spruce up the docs of several queries related to the type/trait syste…
fmease Dec 26, 2024
b9df376
Rollup merge of #134606 - RalfJung:ptr-copy-docs, r=Mark-Simulacrum
jieyouxu Dec 27, 2024
7bbbfc6
Rollup merge of #134622 - ChrisDenton:write-file-utf8, r=Mark-Simulacrum
jieyouxu Dec 27, 2024
bc3e891
Rollup merge of #134759 - Zalathar:normalize, r=jieyouxu
jieyouxu Dec 27, 2024
72ef16f
Rollup merge of #134787 - fmease:spruce-up-queries, r=compiler-errors
jieyouxu Dec 27, 2024
d419cc7
Rollup merge of #134806 - notriddle:notriddle/parent-path-is-better, …
jieyouxu Dec 27, 2024
3980cc6
Rollup merge of #134815 - 9names:sort_platform_md_targets, r=jieyouxu
jieyouxu Dec 27, 2024
f65dc4f
Rollup merge of #134816 - Integral-Tech:pathbuf-refactor, r=lqd
jieyouxu Dec 27, 2024
5544091
Rollup merge of #134819 - ChrisDenton:trunc, r=Mark-Simulacrum
jieyouxu Dec 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler/rustc_const_eval/src/interpret/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
let src_alloc = self.get_alloc_raw(src_alloc_id)?;
let src_range = alloc_range(src_offset, size);
assert!(!self.memory.validation_in_progress, "we can't be copying during validation");
// For the overlapping case, it is crucial that we trigger the read hook
// before the write hook -- the aliasing model cares about the order.
M::before_memory_read(
tcx,
&self.machine,
Expand Down
8 changes: 3 additions & 5 deletions library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4364,13 +4364,11 @@ pub const unsafe fn copy_nonoverlapping<T>(src: *const T, dst: *mut T, count: us
///
/// Behavior is undefined if any of the following conditions are violated:
///
/// * `src` must be [valid] for reads of `count * size_of::<T>()` bytes, and must remain valid even
/// when `dst` is written for `count * size_of::<T>()` bytes. (This means if the memory ranges
/// overlap, the two pointers must not be subject to aliasing restrictions relative to each
/// other.)
/// * `src` must be [valid] for reads of `count * size_of::<T>()` bytes.
///
/// * `dst` must be [valid] for writes of `count * size_of::<T>()` bytes, and must remain valid even
/// when `src` is read for `count * size_of::<T>()` bytes.
/// when `src` is read for `count * size_of::<T>()` bytes. (This means if the memory ranges
/// overlap, the `dst` pointer must not be invalidated by `src` reads.)
///
/// * Both `src` and `dst` must be properly aligned.
///
Expand Down