Skip to content

borrowck: treat CoroutineClosure like Closure in mut/move diagnostics#607

Open
SebTardif wants to merge 1 commit into
mainfrom
fix-r77-borrowck-coroutine-closure-diag
Open

borrowck: treat CoroutineClosure like Closure in mut/move diagnostics#607
SebTardif wants to merge 1 commit into
mainfrom
fix-r77-borrowck-coroutine-closure-diag

Conversation

@SebTardif

Copy link
Copy Markdown
Owner

Fixes #605

Summary

Extend mutability upvar suggestions and use-while-moved note suppression to ty::CoroutineClosure, matching existing ty::Closure handling and the PR #576 pattern in diagnostics/mod.rs.

Origin

Compiler audit (CoroutineClosure incomplete diagnostic arms), SebTardif/rust.

Test plan

  • Logic-only diagnostic improvement; no accept/reject change.
  • Async-closure mut/move errors should get the same upvar/origin notes as normal closures.

Mutability and use-while-moved notes only inspected `ty::Closure`, so
async/coroutine closures missed upvar mut suggestions and the
closure-origin note suppression. Align with describe_field / moved-or-
invoked notes (PR #576 pattern).

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

borrowck: mutability and use-while-moved diagnostics miss ty::CoroutineClosure

1 participant