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

analyze: bad rewrite of derive(Clone) #952

Closed
spernsteiner opened this issue Jun 9, 2023 · 0 comments · Fixed by #956
Closed

analyze: bad rewrite of derive(Clone) #952

spernsteiner opened this issue Jun 9, 2023 · 0 comments · Fixed by #956
Assignees

Comments

@spernsteiner
Copy link
Collaborator

Input:

#[derive(Clone)]
struct Foo {
    x: i32,
}

Output:

#[derive(Foo)]
struct Foo {
    x: i32,
}

Notice derive(Clone) has been replaced with derive(Foo), which is bogus.

We previously had some logic to suppress rewrites coming from derive-generated functions, but this seems not to work any more.

aneksteind added a commit that referenced this issue Jun 13, 2023
It turns out #952 was addressed indirectly via #956. This adds a test
case to demonstrate the functionality is now working as expected.
@aneksteind aneksteind self-assigned this Jun 13, 2023
aneksteind added a commit that referenced this issue Jun 26, 2023
A test case to show #905 has been resolved by #956. Relevant: #952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants