Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Daniel-B-Smith opened this issue Sep 5, 2020 · 0 comments · Fixed by #6029
Closed

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

Daniel-B-Smith opened this issue Sep 5, 2020 · 0 comments · Fixed by #6029
Assignees
Labels
A-lint Area: New lints L-correctness Lint: Belongs in the correctness lint group

Comments

@Daniel-B-Smith
Copy link

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/

@Daniel-B-Smith Daniel-B-Smith added the A-lint Area: New lints label Sep 5, 2020
@flip1995 flip1995 added the L-correctness Lint: Belongs in the correctness lint group label Sep 10, 2020
@bors bors closed this as completed in a675778 Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints L-correctness Lint: Belongs in the correctness lint group
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants