-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Rollup of 6 pull requests #149820
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
matthiaskrgr
wants to merge
22
commits into
rust-lang:main
Choose a base branch
from
matthiaskrgr:rollup-19r3gq5
base: main
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 6 pull requests #149820
+2,374
−800
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
Previously, when an `impl Trait` captured multiple higher-ranked lifetimes from an outer `impl Trait`, the compiler would emit a separate error for each captured lifetime. This resulted in verbose and confusing diagnostics, especially in edition 2024 where implicit captures caused duplicate errors. This commit introduces error accumulation that collects all capture spans and lifetime declaration spans, then emits a single consolidated diagnostic using MultiSpan. The new error shows all captured lifetimes with visual indicators and lists all declarations in a single note.
There are major questions remaining about the reentrancy that this allows. It doesn't have any users on github outside of a single project that uses it in a panic=abort project to show backtraces. It can still be emulated through #[alloc_error_handler] or set_alloc_error_hook depending on if you use the standard library or not. And finally it makes it harder to do various improvements to the allocator shim.
…xternal macro
```
error[E0308]: mismatched types
--> $DIR/macro-span-caller-replacement.rs:5:17
|
LL | s = format!("{arg}");
| ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL | macro_with_format!();
| -------------------- in this macro invocation
|
= note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)
```
```
error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
--> $DIR/dyn-trait-type-alias-return-type.rs:4:11
|
LL | fn f() -> T { loop {} }
| ^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: this type alias is unsized
--> $DIR/dyn-trait-type-alias-return-type.rs:1:1
|
LL | type T = dyn core::fmt::Debug;
| ^^^^^^
= note: the return type of a function must have a statically known size
```
…rrors, r=estebank Deduplicate higher-ranked lifetime capture errors in impl Trait Previously, when an `impl Trait` captured multiple higher-ranked lifetimes from an outer `impl Trait`, the compiler would emit a separate error for each captured lifetime. This resulted in verbose and confusing diagnostics, especially in edition 2024 where implicit captures caused duplicate errors. This commit introduces error accumulation that collects all capture spans and lifetime declaration spans, then emits a single consolidated diagnostic using MultiSpan. The new error shows all captured lifetimes with visual indicators and lists all declarations in a single note. r? `@estebank` Fixes rust-lang#143022
Remove -Zoom=panic There are major questions remaining about the reentrancy that this allows. It doesn't have any users on github outside of a single project that uses it in a panic=abort project to show backtraces. It can still be emulated through `#[alloc_error_handler]` or `set_alloc_error_hook` depending on if you use the standard library or not. And finally it makes it harder to do various improvements to the allocator shim. With this PR the sole remaining symbol in the allocator shim that is not effectively emulating weak symbols is the symbol that prevents skipping the allocator shim on stable even when it would otherwise be empty because libstd + `#[global_allocator]` is used. Closes rust-lang#43596 Fixes rust-lang#126683
Correctly provide suggestions when encountering `async fn` with a `dyn Trait` return type
Point at return type of `async fn`s instead of their def `Span`.
Correctly provide suggestions when encountering `async fn` with a `dyn Trait` return type.
Correctly address `type Alias = dyn Trait` when `fn foo() -> Alias { .. }`.
Fix rust-lang#147894.
…nkov Point at span within local macros even when error happens in nested external macro Address issue noticed at https://users.rust-lang.org/t/error-message-does-not-specify-where-in-macro/135157/1. On errors occurring within a macro expansion, point at the innermost local macro expansion point. ``` error[E0308]: mismatched types --> $DIR/macro-span-caller-replacement.rs:5:17 | LL | s = format!("{arg}"); | ^^^^^^^^^^^^^^^^ expected `&str`, found `String` ... LL | macro_with_format!(); | -------------------- in this macro invocation | = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info) ```
…bzol Run clippy on cg_gcc in CI This is to prevent [this issue](rust-lang#149449 (comment)): in cg_gcc repository, we run clippy on our code but not in here, which can create issues. cc `@antoyo` r? `@Kobzol`
…r=JonathanBrouwer,Kivooeo Make typo in field and name suggestions verbose Part of rust-lang#141973.
Member
Author
|
@bors r+ rollup=never p=5 |
Collaborator
Collaborator
bors
added a commit
that referenced
this pull request
Dec 9, 2025
Rollup of 6 pull requests Successful merges: - #147602 (Deduplicate higher-ranked lifetime capture errors in impl Trait) - #147725 (Remove -Zoom=panic) - #148491 ( Correctly provide suggestions when encountering `async fn` with a `dyn Trait` return type) - #148717 (Point at span within local macros even when error happens in nested external macro) - #149458 (Run clippy on cg_gcc in CI) - #149816 (Make typo in field and name suggestions verbose) r? `@ghost` `@rustbot` modify labels: rollup
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
💔 Test failed - checks-actions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
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-clippy
Relevant to the Clippy team.
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:
async fnwith adyn Traitreturn type #148491 ( Correctly provide suggestions when encounteringasync fnwith adyn Traitreturn type)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup