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 6 pull requests #134613

Closed
wants to merge 16 commits into from
Closed

Rollup of 6 pull requests #134613

wants to merge 16 commits into from

Conversation

DianQK
Copy link
Member

@DianQK DianQK commented Dec 21, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Fulgen301 and others added 16 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 <[email protected]>
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
Move test rust-lang#93775 to crashes

Closes rust-lang#132111. Closes rust-lang#133432. Re-opens rust-lang#93775.

I think this test case is flaky because the recursive calls happen to hit the upper limit of the call stack.

IMO, this may not be an issue, as it's reasonable for overly complex code to require additional build configurations (such as increasing the call stack size).

r? jieyouxu

try-job: x86_64-msvc
try-job: i686-msvc
@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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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
@DianQK
Copy link
Member Author

DianQK commented Dec 21, 2024

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 21, 2024

📌 Commit c76de02 has been approved by DianQK

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 21, 2024

⌛ Testing commit c76de02 with merge 2f9fb36...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 21, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#131072 (Win: Use POSIX rename semantics for `std::fs::rename` if available)
 - rust-lang#134325 (Correctly document CTFE behavior of is_null and methods that call is_null.)
 - rust-lang#134526 (update `rustc_index_macros` feature handling)
 - rust-lang#134581 (Bump Fuchsia toolchain for testing)
 - rust-lang#134607 (on pair → on par)
 - rust-lang#134608 (Move test rust-lang#93775 to crashes)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [crashes] tests/crashes/95134.rs ... ok
test [crashes] tests/crashes/const_mut_ref_check_bypass.rs ... ok
test [crashes] tests/crashes/98322.rs ... ok
test [crashes] tests/crashes/92004.rs ... ok
2024-12-21T21:13:20.983468Z ERROR compiletest::runtest: fatal error, panic: "crashtest no longer crashes/triggers ICE, horray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`."

failures:

---- [crashes] tests/crashes/recursive-print-issue-93775.rs stdout ----
---- [crashes] tests/crashes/recursive-print-issue-93775.rs stdout ----

error: crashtest no longer crashes/triggers ICE, horray! Please give it a meaningful name, add a doc-comment to the start of the test explaining why it exists and move it to tests/ui or wherever you see fit. Adding 'Fixes #<issueNr>' to your PR description ensures that the corresponding ticket is auto-closed upon merge. If you want to see verbose output, set `COMPILETEST_VERBOSE_CRASHES=1`.
thread '[crashes] tests/crashes/recursive-print-issue-93775.rs' panicked at src/tools/compiletest/src/runtest/crashes.rs:17:18:
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:

@bors
Copy link
Contributor

bors commented Dec 21, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 21, 2024
@DianQK DianQK deleted the rollup-plh82k8 branch December 21, 2024 23:27
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 O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

9 participants