diff options
| author | Stuart Cook <Zalathar@users.noreply.github.com> | 2025-01-01 16:35:31 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-01 16:35:31 +1100 |
| commit | f91bfd97bfb411bd3f27cc5dacc88baa345c4162 (patch) | |
| tree | 0408945131e51c9f2e091e8c64d2666437683631 /compiler/rustc_codegen_llvm/src | |
| parent | 1ea1db5b0875c579c9b9e4d078c2ee4bf0ffe6e5 (diff) | |
| parent | f28e13b0552ab7b95e0cc764c5285ebac23fcaa2 (diff) | |
| download | rust-f91bfd97bfb411bd3f27cc5dacc88baa345c4162.tar.gz rust-f91bfd97bfb411bd3f27cc5dacc88baa345c4162.zip | |
Rollup merge of #134945 - compiler-errors:map-mutate-nits, r=estebank
Some small nits to the borrowck suggestions for mutating a map through index
1. Suggesting users to either use `.insert` or `.get_mut` (which do totally different things) can be a bit of a footgun, so let's make that a bit more nuanced.
2. I find the suggestion of `.get_mut(|val| { *val = whatever; })` to be a bit awkward. I changed this to be an if-let instead.
3. Fix a bug which was suppressing the structured suggestion for some mutations via the index operator on `HashMap`/`BTreeMap`.
r? estebank or reassign
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
