rust-analyzer version: 0.4.1816-standalone (d410d4a 2024-01-21)
rustc version: 1.77.0-nightly (d5fd099 2024-01-22)
Code https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=143f7fbac71c9d440720ae04f8c9018c gives error cannot mutate immutable variable f at the line 21, but compiles fine in rustc.