Skip to content

Rollup of 4 pull requests#157632

Closed
JonathanBrouwer wants to merge 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-06kmLWL
Closed

Rollup of 4 pull requests#157632
JonathanBrouwer wants to merge 13 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-06kmLWL

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

zedddie and others added 13 commits June 7, 2026 00:01
Letting `lower_lifetime` check `tcx.named_bound_var` & call `re_infer`
just means we now end up passing `lifetime.ident.span` to `re_infer`
instead of the `span` of the trait object type. However,

1. in the case of `LifetimeKind::ImplicitObjectLifetimeDefault`
   `lifetime.ident.span` is actually equal to said span.
2. in the case of `LifetimeKind::Infer` the span now makes more sense;
   consider `dyn Trait + '_` where the span now just contains the `'_`
   not the entire type which is just better.
…nfer`

This makes it really obvious that we're computing object region bounds
for `Infer`, too, not just for `ImplicitObjectLifetimeDefault` which was
really hard to see beforehand. It's unclear to me whether this was
intentional or not, needs investigation.

Introduce method `lower_trait_object_lifetime` to allow usage of early
returns to make the control flow clearer compared to the `unwrap_or_else`.
…wnGnome

Remove comments already covered by rustdoc

Since rust-lang#157310 was merged, rustdoc renders `impl` restrictions. As such, these comments are no longer necessary.
…ivooeo

Simplify the HIR ty lowering of trait object lifetime bounds

See individual commit messages for details.
rustc_resolve: point the label span at the segment that could not be resolved

This is part of work that @weiznich and I are doing for `#[diagnostic::on_unknown]`.

This means that you can put the attribute in macro_rules macros and have the label message point at the input the user gave. It's imo also the right thing to point the span at in general.
```rust
mod things {}

macro_rules! mac {
    ($thing: ident) => {{
        const _x: u32 = {
            #[diagnostic::on_unknown(label = "you did the bad thing")]
            use things::$thing;
            //~^ERROR unresolved import `things::what` [E0432]
            //~|ERROR unresolved import `things::what2` [E0432]
            $thing
        };
    }};
}
```
```
LL | |         what2
   | |         ----- you did the bad thing
```
See also the first and last commit for what these messages look(ed) like.

cc @estebank
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jun 9, 2026
@rustbot rustbot added O-unix Operating system: Unix-like O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. labels Jun 9, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors

rust-bors Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 345d67c has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jun 9, 2026
@rust-bors

rust-bors Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 345d67c with merge ee87232

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/27181793674

rust-bors Bot pushed a commit that referenced this pull request Jun 9, 2026
Rollup of 4 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jun 9, 2026
@rust-bors

rust-bors Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 9, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unix Operating system: Unix-like O-windows Operating system: Windows rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants