rust-lang/rust-clippy

Suggestion: borrowing a RefCell in funarg position

Open

#4632 aperta il 4 ott 2019

Vedi su GitHub
 (2 commenti) (3 reazioni) (0 assegnatari)Rust (1391 fork)batch import
A-lintT-middlegood first issue

Metriche repository

Star
 (10.406 star)
Metriche merge PR
 (Merge medio 19g 22h) (113 PR mergiate in 30 g)

Descrizione

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?

Guida contributor