Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect method not found on arbitrary self type with different mutability #114469

Merged
merged 3 commits into from
Aug 10, 2023

Commits on Aug 4, 2023

  1. 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 rust-lang#57994, as one of the presented cases can lead to code like
    this.
    estebank committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    6d11b2f View commit details
    Browse the repository at this point in the history
  2. Add tests for rust-lang#57994

    estebank committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    f7486ff View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. review comments

    estebank committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    843549e View commit details
    Browse the repository at this point in the history