rust-lang/rust-clippy

Suggestion: borrowing a RefCell in funarg position

Open

#4,632 建立於 2019年10月4日

在 GitHub 查看
 (2 留言) (3 反應) (0 負責人)Rust (10,406 star) (1,391 fork)batch import
A-lintT-middlegood first issue

描述

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?

貢獻者指南

Suggestion: borrowing a RefCell in funarg position · rust-lang/rust-clippy#4632 | Good First Issue