-
Notifications
You must be signed in to change notification settings - Fork 14k
Rollup of 9 pull requests #148802
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
Closed
Closed
Rollup of 9 pull requests #148802
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
and remove unused Steal::get_mut
Adds missing test coverage for rustdoc's `--test-builder` option. The existing test only covered the error case (non-executable builder). This PR adds: - A custom test builder that logs arguments and forwards to rustc - A test verifying that `--test-builder` successfully invokes the custom builder with rustc-style arguments - Improved comments explaining both the error and success test scenarios The test validates that custom builders can properly intercept and handle doctest compilation. Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Required to allow the compiler to build with the debug_refcell stdlib cargo feature.
Add `Steal::risky_hack_borrow_mut` I'm working on a rustc driver (Creusot) which needs to modify the MIR read by two queries, `mir_borrowck` and `check_liveness`, in different ways for each query. Both of these queries use `mir_promoted` to read the MIR, which is immutable (until it is stolen). This adds an escape hatch so rustc drivers can mutate MIR for specific queries. And this removes `get_mut` which is unused and also unusable now that there's no way to get a `&mut Steal` from the rustc API. Another approach may be to override the queries to modify the MIR after having read it from `mir_promoted`. However the implementation of queries is largely hidden, so I can't just copy their code to then modify it. A solution would be to parameterize the queries with callbacks which get instantiated with `mir_promoted` by default, but that seems more involved and ad hoc. That's why I'm proposing this smaller change instead.
…llaumeGomez Add test for --test-builder success path Fixes rust-lang#148586
a few small clippy fixes
…szelmann Port `cfg_select!` to the new attribute parsing system Best reviewed commit by commit, since it involves some moving around of code r? ```@jdonszelmann```
rustc_target: hide TargetOptions::vendor Discussed in rust-lang#148531 (comment). r? ```@bjorn3```
Fix a typo in the documentation for the strict_shr function fix: rust-lang#148761
…, r=nnethercote
Implement DynSend and DynSync for std::panic::Location.
Allows the compiler to build with the `debug_refcell` stdlib cargo feature.
With `rust.std-features = ["debug_refcell"]` in bootstrap.toml, `./x.py build --stage 2` fails before this patch, and succeeds afterwards.
<details> <summary>error for `./x.py build --stage 2` before this patch</summary>
```Rust
error[E0277]: `NonNull<str>` doesn't implement `DynSync`. Add it to `rustc_data_structures::marker` or use `IntoDynSyncSend` if it's already `Sync`
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:719:33
|
719 | let results = broadcast(|_| {
| _______________________---------_^
| | |
| | required by a bound introduced by this call
720 | | let mut local = self.local.borrow_mut();
... |
734 | | });
| |_________^ within `Location<'static>`, the trait `DynSync` is not implemented for `NonNull<str>`
|
note: required because it appears within the type `Location<'static>`
--> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/panic/location.rs:39:12
|
39 | pub struct Location<'a> {
| ^^^^^^^^
= note: required for `&'static Location<'static>` to implement `DynSend`
note: required because it appears within the type `std::option::Option<&'static Location<'static>>`
--> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/option.rs:599:10
|
599 | pub enum Option<T> {
| ^^^^^^
note: required because it appears within the type `std::cell::UnsafeCell<std::option::Option<&'static Location<'static>>>`
--> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/cell.rs:2289:12
|
2289 | pub struct UnsafeCell<T: ?Sized> {
| ^^^^^^^^^^
note: required because it appears within the type `Cell<std::option::Option<&'static Location<'static>>>`
--> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/cell.rs:313:12
|
313 | pub struct Cell<T: ?Sized> {
| ^^^^
note: required because it appears within the type `RefCell<LocalEncoderState>`
--> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/library/core/src/cell.rs:822:12
|
822 | pub struct RefCell<T: ?Sized> {
| ^^^^^^^
= note: required for `rustc_data_structures::sync::WorkerLocal<RefCell<LocalEncoderState>>` to implement `DynSync`
note: required because it appears within the type `EncoderState<D>`
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:546:8
|
546 | struct EncoderState<D: Deps> {
| ^^^^^^^^^^^^
= note: required because it appears within the type `&EncoderState<D>`
note: required because it's used within this closure
--> compiler/rustc_query_system/src/dep_graph/serialized.rs:719:33
|
719 | let results = broadcast(|_| {
| ^^^
note: required by a bound in `rustc_data_structures::sync::broadcast`
--> /home/zachary/opt_mount/zachary/Programming/rust-compiler-2/compiler/rustc_data_structures/src/sync/parallel.rs:239:56
|
239 | pub fn broadcast<R: DynSend>(op: impl Fn(usize) -> R + DynSync) -> Vec<R> {
| ^^^^^^^ required by this bound in `broadcast`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `rustc_query_system` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:02:04
```
</details>
…=yotamofek [rustdoc] Remove unneeded `allow(rustc::potential_query_instability)` Originally replaced it with an `expect` and since it failed compilation because it wasn't triggered, I removed it.
fix "is_closure_like" doc comment Noticed that the [docs](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html#method.is_closure_like) stopped in the middle of the sentence. The text exists, but wasn't rendered because it was a regular comment.
Member
Author
|
@bors r+ rollup=never p=5 |
Collaborator
Collaborator
bors
added a commit
that referenced
this pull request
Nov 10, 2025
Rollup of 9 pull requests Successful merges: - #148480 (Add `Steal::risky_hack_borrow_mut`) - #148608 (Add test for --test-builder success path) - #148667 (a few small clippy fixes) - #148712 (Port `cfg_select!` to the new attribute parsing system) - #148760 (rustc_target: hide TargetOptions::vendor) - #148775 (Fix a typo in the documentation for the strict_shr function) - #148779 (Implement DynSend and DynSync for std::panic::Location.) - #148781 ([rustdoc] Remove unneeded `allow(rustc::potential_query_instability)`) - #148791 (fix "is_closure_like" doc comment) r? `@ghost` `@rustbot` modify labels: rollup
Member
Author
|
Seems like this got stuck. It's been almost 4.5 hours and hasn't made progress in a long while. @bors r- retry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-run-make
Area: port run-make Makefiles to rmake.rs
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-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc 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:
Steal::risky_hack_borrow_mut#148480 (AddSteal::risky_hack_borrow_mut)cfg_select!to the new attribute parsing system #148712 (Portcfg_select!to the new attribute parsing system)allow(rustc::potential_query_instability)#148781 ([rustdoc] Remove unneededallow(rustc::potential_query_instability))r? @ghost
@rustbot modify labels: rollup
Create a similar rollup