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

"Remove unnecessary async" assist should not appear in trait impls #13492

Closed
j-tai opened this issue Oct 27, 2022 · 3 comments · Fixed by #13508
Closed

"Remove unnecessary async" assist should not appear in trait impls #13492

j-tai opened this issue Oct 27, 2022 · 3 comments · Fixed by #13508
Assignees

Comments

@j-tai
Copy link

j-tai commented Oct 27, 2022

The Remove unnecessary async code assist should not be available inside trait implementations. This is because the async is required to conform to the trait interface, so the async is not "unnecessary".

Reproduce:

  1. Paste the following code

    trait Trait {
        async fn foo();
    }
    
    impl Trait for () {async fn foo() {
    
        }
    }

    denotes the cursor location.

  2. Press alt+. to show code assists

rust-analyzer version: 0.3.1258-standalone

rustc version: 1.64.0 (a55dd71d5 2022-09-19)

relevant settings:

@koka831
Copy link
Contributor

koka831 commented Oct 27, 2022

@rustbot claim

@weirdsmiley
Copy link
Contributor

@koka831 are you still working on this?

@koka831
Copy link
Contributor

koka831 commented Oct 28, 2022

hi @weirdsmiley, I just made a PR(#13508).

@bors bors closed this as completed in a8e97bc Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants