rust-lang/rust-clippy

Suggestion: borrowing a RefCell in funarg position

Open

#4,632 创建于 2019年10月4日

在 GitHub 查看
 (2 评论) (3 反应) (0 负责人)Rust (1,391 fork)batch import
A-lintT-middlegood first issue

仓库指标

Star
 (10,406 star)
PR 合并指标
 (平均合并 19天 22小时) (30 天内合并 113 个 PR)

描述

I recently came across this fun correctness bug in my code: https://github.com/rust-lang/rust/issues/65086.

I’m not sure how I could have known this without asking a compiler developer. Can we add a lint prohibiting RefCell borrows in funarg position since they prevent mutable borrows further down the stack?

贡献者指南