-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 10 pull requests #142614
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
Open
workingjubilee
wants to merge
25
commits into
rust-lang:master
Choose a base branch
from
workingjubilee:rollup-g5qf7y3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rollup of 10 pull requests #142614
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Streamlined the explanation of covariance for `NonNull<T>`, focusing on practical usage and reducing scary explanation. Added a concise example for cases where invariance is required, showing how to use `PhantomData<Cell<T>> Signed-off-by: xizheyin <[email protected]>
In particular, there should be no additional errors (default field values for `union` fields are currently erroneously accepted).
more information to Display implementation for BorrowError/BorrowMutError - The BorrowError/BorrowMutError Debug implementations do not print anything differently from what the derived implementation does, so we don't need it. - This change also adds the location field of BorrowError/BorrowMutError to the the Display output when it is present, rewords the error message, and uses the Display trait for outputting the error message instead of Debug.
It's actually used as a counter so update the name to reflect that.
…u` unwind mechanism
Make performance description of String::{insert,insert_str,remove} more precise
std: refactor explanation of `NonNull` Fixes rust-lang#141933 I cut out the excessive explanation and used an example to explain how to maintain invariance, but I think what is quoted in the *rust reference* in the document needs to be added with a more layman's explanation and example. (I'm not sure if I deleted too much) r? ``@workingjubilee``
Miscellaneous RefCell cleanups - Clarify `RefCell` error messages when borrow rules are broken - Remove `Debug` impl for `BorrowError`/`BorrowMutError` since `#derive(Debug)` provides identical functionality - Rename `BorrowFlag` to `BorrowCounter`
…s, r=petrochenkov avoid `&mut P<T>` in `visit_expr` etc methods trying a different way than rust-lang#141636 r? ghost
Try unremapping compiler sources See [#t-compiler/help > Span pointing to wrong file location (`rustc-dev` component)](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Span.20pointing.20to.20wrong.20file.20location.20.28.60rustc-dev.60.20component.29/with/521087083). This PR is a follow-up to rust-lang#141751 regarding the compiler side. Specifically we now take into account the `CFG_VIRTUAL_RUSTC_DEV_SOURCE_BASE_DIR` env from rust-lang#141751 when trying to unremap sources from `$sysroot/lib/rustlib/rustc-src/rust` (the `rustc-dev` component install directory). Best reviewed commit by commit. cc `@samueltardieu` r? `@jieyouxu`
…lacrum Windows: Use anonymous pipes in Command When setting `Stdio::pipe` on `Command` we want to create an anonymous pipe that can be used asynchronously (at least on our end). Usually we'd use [`CreatePipe`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe) to open anonymous pipes but unfortunately it opens pipes for synchronous access. The alternative is to use [`CreateNamedPipeW`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createnamedpipew) which does allow asynchronous access but that requires giving a file name to the pipe. So we currently have this awful hack where we attempt to emulate anonymous pipes using `CreateNamedPipeW` by attempting to create a unique name and looping until we find one that doesn't already exist. The better option is to use the lower level [`NtCreateNamedPipeFile`](https://learn.microsoft.com/en-us/windows/win32/devnotes/nt-create-named-pipe-file) (which is used internally by both `CreatePipe` and `CreateNamedPipeW`). This function wasn't documented until a few years ago but now that it is it's ok for us to use it. try-job: *msvc* try-job: *mingw*
…r=SparrowLii Manually invalidate caches in SimplifyCfg. The current `SimplifyCfg` pass unconditionally invalidates CFG caches. This is unfortunate if there are no modifications that require this invalidation.
…i865 Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism Closes rust-lang#128911. This PR *re-enables* the `dump-ice-to-disk` test and the unstable feature usage metrics tests for {x86_64,i686} Windows MSVC hosts and x86_64 Windows GNU host. I'll keep an eye out for these tests, and will broaden the ignores if this test is still flaky on not just `i686-pc-windows-gnu`. r? mati865 try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: x86_64-mingw-1
Reject union default field values Fixes rust-lang#142555. The [`default_field_values` RFC][rfc] does not specify that default field values may be used on `union`s, and it's not clear how default field values may be used with `union`s without an design extension to the RFC. So, for now, reject trying to use default field values with `union`s. ### Review notes - The first commit adds the `union` with default field values test case to `tests/ui/structs/default-field-values/failures.rs`, where `union`s with default field values are currently accepted. - The second commit rejects trying to supply default field values to `union` definitions. - When `default_field_values` feature gate is disabled, we show the feature gate error when the user tries to write `union`s with default field values. When the feature gate is enabled, we reject this usage with > unions cannot have default field values ```@rustbot``` label: +F-default_field_values [rfc]: https://rust-lang.github.io/rfcs/3681-default-field-values.html
Handle same-crate macro for borrowck semicolon suggestion Handles rust-lang#142543 (comment) cc ```@m-ou-se``` r? ```@fmease```
@bors rollup=never p=5 r+ |
bors
added a commit
that referenced
this pull request
Jun 17, 2025
Rollup of 10 pull requests Successful merges: - #138538 (Make performance description of String::{insert,insert_str,remove} more precise) - #141946 (std: refactor explanation of `NonNull`) - #142216 (Miscellaneous RefCell cleanups) - #142371 (avoid `&mut P<T>` in `visit_expr` etc methods) - #142377 (Try unremapping compiler sources) - #142517 (Windows: Use anonymous pipes in Command) - #142542 (Manually invalidate caches in SimplifyCfg.) - #142563 (Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism) - #142570 (Reject union default field values) - #142584 (Handle same-crate macro for borrowck semicolon suggestion) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Pure flake? |
@bors2 try jobs=dist-aarch64-apple |
rust-bors bot
added a commit
that referenced
this pull request
Jun 17, 2025
Rollup of 10 pull requests Successful merges: - #138538 (Make performance description of String::{insert,insert_str,remove} more precise) - #141946 (std: refactor explanation of `NonNull`) - #142216 (Miscellaneous RefCell cleanups) - #142371 (avoid `&mut P<T>` in `visit_expr` etc methods) - #142377 (Try unremapping compiler sources) - #142517 (Windows: Use anonymous pipes in Command) - #142542 (Manually invalidate caches in SimplifyCfg.) - #142563 (Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism) - #142570 (Reject union default field values) - #142584 (Handle same-crate macro for borrowck semicolon suggestion) r? `@ghost` `@rustbot` modify labels: rollup <!-- homu-ignore:start --> [Create a similar rollup](https://bors.rust-lang.org/queue/rust?prs=138538,141946,142216,142371,142377,142517,142542,142563,142570,142584) <!-- homu-ignore:end --> try-job: dist-aarch64-apple
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-compiletest
Area: The compiletest test runner
A-run-make
Area: port run-make Makefiles to rmake.rs
A-rustc-dev-guide
Area: rustc-dev-guide
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-libs
Relevant to the library team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
NonNull
#141946 (std: refactor explanation ofNonNull
)&mut P<T>
invisit_expr
etc methods #142371 (avoid&mut P<T>
invisit_expr
etc methods)i686-pc-windows-gnu
unwind mechanism #142563 (Refine run-make test ignores due to unpredictablei686-pc-windows-gnu
unwind mechanism)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup