Skip to content

Convert to inline diagnostics in rustc_borrowck#152107

Open
JonathanBrouwer wants to merge 1 commit intorust-lang:mainfrom
JonathanBrouwer:convert_borrowck
Open

Convert to inline diagnostics in rustc_borrowck#152107
JonathanBrouwer wants to merge 1 commit intorust-lang:mainfrom
JonathanBrouwer:convert_borrowck

Conversation

@JonathanBrouwer
Copy link
Contributor

@rustbot rustbot added 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. labels Feb 4, 2026
@lqd
Copy link
Member

lqd commented Feb 4, 2026

I'll also take this one, r? me

@rustbot rustbot assigned lqd and unassigned jdonszelmann Feb 4, 2026
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: rename this module, IIRC SessionDiagnostic is the old name of derived Diagnostic and doesn't make sense anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also added this to the tracking issue :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was mostly for me to remember to do it at some point, but sure, anyone could do it

@@ -203,77 +216,97 @@ pub(crate) enum CaptureVarKind {

#[derive(Subdiagnostic)]
pub(crate) enum CaptureVarCause {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: clean up opportunities here due to combinatorial explosion of borrow/move use/use of place in closure/coroutine etc

@lqd
Copy link
Member

lqd commented Feb 5, 2026

r=me with the first two comments resolved, the other 2 are just notes about pre-existing annoyances I'd like to fix in the future

@JonathanBrouwer
Copy link
Contributor Author

@bors r=lqd rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 5, 2026

📌 Commit 5263438 has been approved by lqd

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 Feb 5, 2026
@rust-log-analyzer

This comment has been minimized.

@JonathanBrouwer
Copy link
Contributor Author

Spurious @GuillaumeGomez

rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #150831 (c-variadic: make `va_arg` match on `Arch` exhaustive)
 - #152113 (Fix GitHub CI summary in CodeBuild)
 - #152153 (Incorporate query description functions into `QueryVTable`)
 - #152070 (Convert to inline diagnostics in `rustc_pattern_analysis`)
 - #152106 (Convert to inline diagnostics in `rustc_ast_passes`)
 - #152109 (Convert to inline diagnostics in `rustc_errors`)
 - #152119 (Convert to inline diagnostics in `rustc_middle`)
 - #152121 (Convert to inline diagnostics in `rustc_builtin_macros`)
 - #152133 (library/std: Rename `ON_BROKEN_PIPE_FLAG_USED` to `ON_BROKEN_PIPE_USED`)

Failed merges:

 - #152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152126 (Convert to inline diagnostics in `rustc_mir_build`)
 - #152131 (Port rustc_no_implicit_bounds attribute to parser.)
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 5, 2026
@rust-bors

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Feb 5, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@JonathanBrouwer
Copy link
Contributor Author

@bors r=lqd

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 5, 2026

📌 Commit dd61998 has been approved by lqd

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 5, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 5, 2026
…r=lqd

Convert to inline diagnostics in `rustc_borrowck`

For rust-lang#151366
r? @jdonszelmann
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 5, 2026
…r=lqd

Convert to inline diagnostics in `rustc_borrowck`

For rust-lang#151366
r? @jdonszelmann
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #151278 (Provide more context on trait bounds being unmet due to imperfect derive)
 - #151955 (escape symbol names in global asm)
 - #149329 (Mark match arms in try and for as being from desugarings.)
 - #151474 (Minor structural improvements)
 - #151744 (fix refining_impl_trait suggestion with return_type_notation)
 - #152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152136 (Consolidate type const checks on `tcx.is_type_const`)
 - #152170 (Port `rustc_effective_visibility` to the new attribute parser)
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #151278 (Provide more context on trait bounds being unmet due to imperfect derive)
 - #151955 (escape symbol names in global asm)
 - #149329 (Mark match arms in try and for as being from desugarings.)
 - #151474 (Minor structural improvements)
 - #151744 (fix refining_impl_trait suggestion with return_type_notation)
 - #152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152136 (Consolidate type const checks on `tcx.is_type_const`)
 - #152170 (Port `rustc_effective_visibility` to the new attribute parser)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 5, 2026
…r=lqd

Convert to inline diagnostics in `rustc_borrowck`

For rust-lang#151366
r? @jdonszelmann
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #152174 (stdarch subtree update)
 - #151278 (Provide more context on trait bounds being unmet due to imperfect derive)
 - #151955 (escape symbol names in global asm)
 - #149329 (Mark match arms in try and for as being from desugarings.)
 - #151474 (Minor structural improvements)
 - #151744 (fix refining_impl_trait suggestion with return_type_notation)
 - #152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152136 (Consolidate type const checks on `tcx.is_type_const`)
 - #152170 (Port `rustc_effective_visibility` to the new attribute parser)
 - #152184 (Port rustc_abi to the attribute parser)
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #152174 (stdarch subtree update)
 - #151278 (Provide more context on trait bounds being unmet due to imperfect derive)
 - #151955 (escape symbol names in global asm)
 - #149329 (Mark match arms in try and for as being from desugarings.)
 - #151474 (Minor structural improvements)
 - #151744 (fix refining_impl_trait suggestion with return_type_notation)
 - #152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152136 (Consolidate type const checks on `tcx.is_type_const`)
 - #152170 (Port `rustc_effective_visibility` to the new attribute parser)
 - #152184 (Port rustc_abi to the attribute parser)
rust-bors bot pushed a commit that referenced this pull request Feb 5, 2026
…uwer

Rollup of 11 pull requests

Successful merges:

 - #152174 (stdarch subtree update)
 - #151278 (Provide more context on trait bounds being unmet due to imperfect derive)
 - #151955 (escape symbol names in global asm)
 - #149329 (Mark match arms in try and for as being from desugarings.)
 - #151474 (Minor structural improvements)
 - #151744 (fix refining_impl_trait suggestion with return_type_notation)
 - #152107 (Convert to inline diagnostics in `rustc_borrowck`)
 - #152117 (Convert to inline diagnostics in `rustc_trait_selection`)
 - #152136 (Consolidate type const checks on `tcx.is_type_const`)
 - #152170 (Port `rustc_effective_visibility` to the new attribute parser)
 - #152184 (Port rustc_abi to the attribute parser)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants