Skip to content

Conversation

@cuiweixie
Copy link
Contributor

@cuiweixie cuiweixie commented Feb 8, 2026

should be same in:

if fn_return.span.desugaring_kind().is_some() {
// Skip `async` desugaring `impl Future`.
continue;
}

@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 8, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 8, 2026

r? @JonathanBrouwer

rustbot has assigned @JonathanBrouwer.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: borrowck, compiler
  • borrowck, compiler expanded to 22 candidates
  • Random selection from 13 candidates

@JonathanBrouwer
Copy link
Contributor

Hi there, thanks for your contribution!

Could you explain what bug this is fixing, and if possible, add a regression test?

@cuiweixie
Copy link
Contributor Author

cuiweixie commented Feb 8, 2026

Hi there, thanks for your contribution!

Could you explain what bug this is fixing, and if possible, add a regression test?

I think add this continue statement is reasonable, same as in

if fn_return.span.desugaring_kind().is_some() {
// Skip `async` desugaring `impl Future`.
continue;
}

@JonathanBrouwer
Copy link
Contributor

This looks right to me, especially given the comment, but don't know the code and could also believe a break being better.
@rustbot reroll

Comment on lines 873 to 876
if alias_ty.span.desugaring_kind().is_some() {
// Skip `async` desugaring `impl Future`.
continue;
}
Copy link
Member

@jieyouxu jieyouxu Feb 10, 2026

Choose a reason for hiding this comment

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

Question: can a test demonstrate the diagnostics effect before/after this change? The change itself looks reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have try to,construct. But do not find the right way. it failed then.

@petrochenkov
Copy link
Contributor

@bors r+ rollup
Looks reasonable and only affects some corner cases in diagnostics, I'll just approve without a test.

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 11, 2026

📌 Commit d3ec6a3 has been approved by petrochenkov

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 11, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 12, 2026
Rollup of 17 pull requests

Successful merges:

 - #142415 (Add note when inherent impl for a alias type defined outside of the crate)
 - #142680 (Fix passing/returning structs with the 64-bit SPARC ABI)
 - #150768 (Don't compute FnAbi for LLVM intrinsics in backends)
 - #151152 (Add FCW for derive helper attributes that will conflict with built-in attributes)
 - #151814 (layout: handle rigid aliases without params)
 - #151863 (Borrowck: simplify diagnostics for placeholders)
 - #152159 (Add note for `?Sized` params in int-ptr casts diag)
 - #152434 (Clarify names of `QueryVTable` functions for "executing" a query)
 - #152478 (Remove tm_factory field from CodegenContext)
 - #152498 (Partially revert "resolve: Update `NameBindingData::vis` in place")
 - #152316 (fix: add continue)
 - #152394 (Correctly check if a macro call is actually a macro call in rustdoc highlighter)
 - #152425 (Port #![test_runner] to the attribute parser)
 - #152481 (Use cg_ssa's produce_final_output_artifacts in cg_clif)
 - #152485 (fix issue#152482)
 - #152495 (Clean up some subdiagnostics)
 - #152502 (Implement `BinaryHeap::from_raw_vec`)
@rust-bors rust-bors bot merged commit 3ba1a83 into rust-lang:main Feb 12, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 12, 2026
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