diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2025-01-28 19:35:31 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2025-01-28 19:35:51 +0000 |
| commit | 130b0d294a3404b5827869de5712009f91724700 (patch) | |
| tree | d7735a7124afcecd9b61323715ea1759c8f54a5a /compiler/rustc_codegen_llvm/src/lib.rs | |
| parent | 2f348cb7ce4063fa4eb40038e6ada3c5214717bd (diff) | |
| download | rust-130b0d294a3404b5827869de5712009f91724700.tar.gz rust-130b0d294a3404b5827869de5712009f91724700.zip | |
Tweak `&mut self` suggestion span
```
error[E0596]: cannot borrow `*self.s` as mutable, as it is behind a `&` reference
--> $DIR/issue-38147-1.rs:17:9
|
LL | self.s.push('x');
| ^^^^^^ `self` is a `&` reference, so the data it refers to cannot be borrowed as mutable
|
help: consider changing this to be a mutable reference
|
LL | fn f(&mut self) {
| +++
```
Note the suggestion to add `mut` instead of replacing the entire `&self` with `&mut self`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
0 files changed, 0 insertions, 0 deletions
