Skip to content

Lint for using await while holding RefCell Ref/RefMut #6008

Closed
@Daniel-B-Smith

Description

@Daniel-B-Smith

I'm explicitly creating the new issue at the suggestion of #4226. My plan is to write this myself next week, and it seems like it won't be too hard based on #5439. It is almost always a bug to hold onto a RefCell ref across an await point.

@glommer requests such a thing in this blog post: https://medium.com/@glaubercosta_11125/c-vs-rust-an-async-thread-per-core-story-28c4b43c410c

Another blog post referencing this type of bug: https://ferrous-systems.com/blog/zero-sized-references/

Metadata

Metadata

Labels

A-lintArea: New lintsL-correctnessLint: Belongs in the correctness lint group

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions