about summary refs log tree commit diff
path: root/library/core/benches/array.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-01-25 23:27:01 -0500
committerGitHub <noreply@github.com>2025-01-25 23:27:01 -0500
commit64550d1ed8023bea8668888ea8cfa91f4978875f (patch)
tree822f92973f9c6feeed8eb1b7099f35533d8e95de /library/core/benches/array.rs
parent182ccfa11fe5d7a3a6e9cc0d2100159dcd9963d2 (diff)
parent1dfc437aaf09185c9830b6b5214bc2a089fd297f (diff)
downloadrust-64550d1ed8023bea8668888ea8cfa91f4978875f.tar.gz
rust-64550d1ed8023bea8668888ea8cfa91f4978875f.zip
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.
Diffstat (limited to 'library/core/benches/array.rs')
0 files changed, 0 insertions, 0 deletions