Skip to content
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

Rollup of 5 pull requests #134631

Merged
merged 14 commits into from
Dec 22, 2024
Merged

Rollup of 5 pull requests #134631

merged 14 commits into from
Dec 22, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Fulgen301 and others added 14 commits September 30, 2024 19:49
…available

Windows 10 1601 introduced `FileRenameInfoEx` as well as
`FILE_RENAME_FLAG_POSIX_SEMANTICS`, allowing for atomic renaming. If it
isn't supported, we fall back to `FileRenameInfo`.

This commit also replicates `MoveFileExW`'s behavior of checking whether
the source file is a mount point and moving the mount point instead of
resolving the target path.
… opened and for renaming over a non-empty directory
This updates the Fuchsia SDK used to test rust on Fuchsia to
26.20241211.7.1, and clang to the development version 20 from
388d7f144880dcd85ff31f06793304405a9f44b6.
It seems that cargo can't conditionally propagate features
when `default-features` is set to `false`.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
The "panic in const if CTFE doesn't know the answer" behavior was discussed to be the desired behavior in rust-lang#74939, and is currently how the function actually behaves.

I intentionally wrote this documentation to allow for the possibility that a panic might not occur even if the pointer is out of bounds, because of rust-lang#133700 and other potential changes in the future.
…antics, r=ChrisDenton

Win: Use POSIX rename semantics for `std::fs::rename` if available

Windows 10 1601 introduced `FileRenameInfoEx` as well as `FILE_RENAME_FLAG_POSIX_SEMANTICS`, allowing for atomic renaming and renaming if the target file is has already been opened with `FILE_SHARE_DELETE`, in which case the file gets renamed on disk while the open file handle still refers to the old file, just like in POSIX. This resolves rust-lang#123985, where atomic renaming proved difficult to impossible due to race conditions.

If `FileRenameInfoEx` isn't available due to missing support from the underlying filesystem or missing OS support, the renaming is retried with `FileRenameInfo`, which matches the behavior of `MoveFileEx`.

This PR also manually replicates parts of `MoveFileEx`'s internal logic, as reverse-engineered from the disassembly: If the source file is a reparse point and said reparse point is a mount point, the mount point itself gets renamed; otherwise the reparse point is resolved and the result renamed.

Notes:
- Currently, the `win7` target doesn't bother with `FileRenameInfoEx` at all; it's probably desirable to remove that special casing and try `FileRenameInfoEx` anyway if it doesn't exist, in case the binary is run on newer OS versions.

Fixes rust-lang#123985
Correctly document CTFE behavior of is_null and methods that call is_null.

The "panic in const if CTFE doesn't know the answer" behavior was discussed to be the desired behavior in rust-lang#74939, and is currently how the function actually behaves.

I intentionally wrote this documentation to allow for the possibility that a panic might not occur even if the pointer is out of bounds, because of rust-lang#133700 and other potential changes in the future.

This is beta-nominated since `const fn is_null` stabilization is in beta already but the docs there are wrong, and it seems better to have the docs be correct at the time of stabilization.
…ieyouxu

update `rustc_index_macros` feature handling

It seems that cargo can't [conditionally propagate features](https://github.com/rust-lang/rust/blob/214587c89d527dd0ccbe1f2150c737d3bdee67b0/compiler/rustc_index/Cargo.toml#L20) if they were enabled by default on the target crate, but disabled with `default-features = false` in the current/parent crate.

Fixes rust-lang#118129
Bump Fuchsia toolchain for testing

This updates the Fuchsia SDK used to test rust on Fuchsia to 26.20241211.7.1, and clang to the development version 20 from 388d7f144880dcd85ff31f06793304405a9f44b6.

```@steven807``` asked me to take over the PR. Since I don't have commit access to his repo, I just cherry picked his patch here.

try-job: dist-various-2

r? lqd
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 21, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 21, 2024

📌 Commit 0cfabd5 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 21, 2024
@bors
Copy link
Contributor

bors commented Dec 22, 2024

⌛ Testing commit 0cfabd5 with merge 00bf74d...

@bors
Copy link
Contributor

bors commented Dec 22, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 00bf74d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 22, 2024
@bors bors merged commit 00bf74d into rust-lang:master Dec 22, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 22, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#131072 Win: Use POSIX rename semantics for std::fs::rename if av… e12e53351c13ebadcad60ac070585f16b5461355 (link)
#134325 Correctly document CTFE behavior of is_null and methods tha… 8d6462d6e8964346c4e993bda5a094df703aeb00 (link)
#134526 update rustc_index_macros feature handling 8ea555de72cbe157087df6b421a5fe5da9e3113b (link)
#134581 Bump Fuchsia toolchain for testing b01ffdf897343f5036737a21c08b099e988614e6 (link)
#134607 on pair → on par 9aa1c532c1743d6d590ad028bc2d528c973745bc (link)

previous master: 426d173423

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (00bf74d): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.1%, secondary 2.7%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.7% [2.7%, 2.7%] 1
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.1% [-2.1%, -2.1%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 762.028s -> 760.466s (-0.20%)
Artifact size: 330.62 MiB -> 330.63 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants