about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/lib.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2025-01-28 19:35:31 +0000
committerEsteban Küber <esteban@kuber.com.ar>2025-01-28 19:35:51 +0000
commit130b0d294a3404b5827869de5712009f91724700 (patch)
treed7735a7124afcecd9b61323715ea1759c8f54a5a /compiler/rustc_codegen_llvm/src/lib.rs
parent2f348cb7ce4063fa4eb40038e6ada3c5214717bd (diff)
downloadrust-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