rust-lang/rust-clippy

Suggestion: borrowing a RefCell in funarg position

Open

#4 632 ouverte le 4 oct. 2019

Voir sur GitHub
 (2 commentaires) (3 réactions) (0 assignés)Rust (1 391 forks)batch import
A-lintT-middlegood first issue

Métriques du dépôt

Stars
 (10 406 stars)
Métriques de merge PR
 (Merge moyen 19j 22h) (113 PRs mergées en 30 j)

Description

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?

Guide contributeur