about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-01-01 16:35:31 +1100
committerGitHub <noreply@github.com>2025-01-01 16:35:31 +1100
commitf91bfd97bfb411bd3f27cc5dacc88baa345c4162 (patch)
tree0408945131e51c9f2e091e8c64d2666437683631 /compiler/rustc_codegen_llvm/src
parent1ea1db5b0875c579c9b9e4d078c2ee4bf0ffe6e5 (diff)
parentf28e13b0552ab7b95e0cc764c5285ebac23fcaa2 (diff)
downloadrust-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