Rollup merge of #114469 - estebank:arbitrary-self-types-mut-diff, r=davidtwco

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.
This commit is contained in:
Matthias Krüger 2023-08-09 22:59:59 +02:00 committed by GitHub
commit ff0d21f8e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

Diff content is not available