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

Inline function assist doesn't update Self #10291

Closed
Nadrieril opened this issue Sep 19, 2021 · 2 comments
Closed

Inline function assist doesn't update Self #10291

Nadrieril opened this issue Sep 19, 2021 · 2 comments
Labels
A-assists C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now

Comments

@Nadrieril
Copy link
Member

If I run the inline function assist on the call of Foo::bar() in the following:

struct Foo;

impl Foo {
    fn foo() {}
    fn bar() {
        Self::foo()
    }
}

fn main() {
    Foo::bar()
}

I get:

fn main() {
    Self::foo()
}

which fails to compile. I would like to get Foo::foo() instead.

PS: much love to this awesome project, y'all have built an excellent tool ❤️

@Veykril Veykril added A-assists S-actionable Someone could pick this issue up and work on it right now labels Sep 19, 2021
@Veykril
Copy link
Member

Veykril commented Sep 19, 2021

The current implementation is basically just a copy paste of the function body(except for self which is properly replaced).
So correcting paths where possible is definitely something the assist should do in general.

@ice1000
Copy link
Contributor

ice1000 commented Aug 19, 2022

Should be closed by my pr :p

@Veykril Veykril closed this as completed Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assists C-bug Category: bug S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

3 participants