rust-lang/rust-clippy

Suggestion: borrowing a RefCell in funarg position

Open

#4.632 geöffnet am 4. Okt. 2019

Auf GitHub ansehen
 (2 Kommentare) (3 Reaktionen) (0 zugewiesene Personen)Rust (1.391 Forks)batch import
A-lintT-middlegood first issue

Repository-Metriken

Stars
 (10.406 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 22h) (113 gemergte PRs in 30 T)

Beschreibung

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?

Contributor Guide