rust-lang/rust-clippy

Suggestion: borrowing a RefCell in funarg position

Open

#4.632 aberto em 4 de out. de 2019

Ver no GitHub
 (2 comments) (3 reactions) (0 assignees)Rust (1.391 forks)batch import
A-lintT-middlegood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 19d 22h) (113 fundiu PRs em 30d)

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?

Guia do colaborador