about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-08-04 15:29:22 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-08-04 16:05:59 +0000
commit6d11b2f2af20fae46939f8a4f363c9c70bc260cd (patch)
tree76bd392b313ec93ce48a3cc2c9ffc76b4f745624 /compiler/rustc_codegen_llvm/src
parentc435af0d5c47a333c7cb7f359f3586d5c9dab3ab (diff)
downloadrust-6d11b2f2af20fae46939f8a4f363c9c70bc260cd.tar.gz
rust-6d11b2f2af20fae46939f8a4f363c9c70bc260cd.zip
Detect method not found on arbitrary self type with different mutability
```
error[E0599]: no method named `x` found for struct `Pin<&S>` in the current scope
  --> $DIR/arbitrary_self_type_mut_difference.rs:11:18
   |
LL |     Pin::new(&S).x();
   |                  ^ help: there is a method with a similar name: `y`
   |
note: method is available for `Pin<&mut S>`
  --> $DIR/arbitrary_self_type_mut_difference.rs:6:5
   |
LL |     fn x(self: Pin<&mut Self>) {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
```

Related to #57994, as one of the presented cases can lead to code like
this.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions