rust/compiler/rustc_passes
Jacob Pratt 64550d1ed8
Rollup merge of #136032 - estebank:issue-136028, r=SparrowLii
Account for mutable borrow in argument suggestion

```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```
instead of
```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```

Fix #136028.
2025-01-25 23:27:01 -05:00
..
src Rollup merge of #136032 - estebank:issue-136028, r=SparrowLii 2025-01-25 23:27:01 -05:00
Cargo.toml Auto merge of #134381 - jdonszelmann:move-attribute-types, r=oli-obk 2024-12-17 18:50:50 +00:00
messages.ftl Auto merge of #119286 - jyn514:linker-output, r=bjorn3 2025-01-25 17:16:33 +00:00