-
Notifications
You must be signed in to change notification settings - Fork 14k
Rollup of 14 pull requests #148800
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 14 pull requests #148800
+865
−345
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
It belongs here, because it moves from a `rustc_*` type to a `rustdoc_json_types` type.
The change in this test is minimal, as this is a specific case. The benefits for other cases explained in issue 148070 outweight the change.
```
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found macro `concat`
--> $DIR/macro-in-attribute.rs:4:21
|
LL | #[deprecated(note = concat!("a", "b"))]
| ^^^^^^^^^^^^^^^^^ macros are not allowed here
```
and remove unused Steal::get_mut
… Box<dyn Trait>`
```
error[E0310]: the parameter type `R` may not live long enough
--> $DIR/implicit-static-lifetime-in-dyn-trait-return-type.rs:10:5
|
LL | fn bb<R>(r: R) -> Box<dyn Foo> {
| ------- this `dyn Trait` has an implicit `'static` lifetime bound
LL | Box::new(Bar(r))
| ^^^^^^^^^^^^^^^^
| |
| the parameter type `R` must be valid for the static lifetime...
| ...so that the type `R` will meet its required lifetime bounds
|
help: consider adding an explicit lifetime bound
|
LL | fn bb<R: 'static>(r: R) -> Box<dyn Foo> {
| +++++++++
```
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: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@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>
Handle macro invocation in attribute during parse
```
error: expected a literal (`1u8`, `1.0f32`, `"string"`, etc.) here, found macro `concat`
--> $DIR/macro-in-attribute.rs:4:21
|
LL | #[deprecated(note = concat!("a", "b"))]
| ^^^^^^^^^^^^^^^^^ macros are not allowed here
```
Fix rust-lang#146325.
rustdoc-json: move `target` to `json::conversions` It belongs here, because it moves from a `rustc_*` type to a `rustdoc_json_types` type. r? ```@GuillaumeGomez```
Update substring match for substitutions
Fixed `as_substr` function to check for matching prefixes too. This fixes this issue where `td::s` is matched instead of `std::`. This same behaviour can be seen with `time` and `tokio::time` and similar cases where the error import starts with the same prefix as the suggestion.
```rust
use sync;
fn main() {}
```
```
error[E0432]: unresolved import `sync`
--> /tmp/test_import.rs:1:5
|
1 | use sync;
| ^^^^ no `sync` in the root
|
help: consider importing this module instead
|
1 | use std::sync;
| +++++
```
After the changes:
```
error[E0432]: unresolved import `sync`
--> /tmp/test_import.rs:1:5
|
1 | use sync;
| ^^^^ no `sync` in the root
|
help: consider importing this module instead
|
1 | use std::sync;
| +++++
```
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.
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
…=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
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Member
Author
|
@bors r- |
Contributor
Contributor
|
And independently, looks like #148061 is failing or conflicting with something |
This was referenced Nov 10, 2025
Member
Author
|
Oh right as you were writing that I created a new rollup with just the |
Contributor
|
That's also the one I chose so perfect, I r-'ed the other two :) |
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
A-rustdoc-json
Area: Rustdoc JSON backend
rollup
A PR which is a rollup
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.
T-rustdoc-frontend
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
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:
targettojson::conversions#147833 (rustdoc-json: movetargettojson::conversions)Steal::risky_hack_borrow_mut#148480 (AddSteal::risky_hack_borrow_mut)'staticlifetime requirement coming from-> Box<dyn Trait>#148506 (Special case detecting'staticlifetime requirement coming from-> Box<dyn Trait>)validate_attr#148647 (Check unsafety for non-macro attributes invalidate_attr)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