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

Replace implementations for auto. derived impl Clone, Debug (& more?) #108

Open
2 tasks
W95Psp opened this issue May 31, 2023 · 4 comments
Open
2 tasks
Labels
engine Issue in the engine P2 Medium priority

Comments

@W95Psp
Copy link
Collaborator

W95Psp commented May 31, 2023

  • when we see an impl for a Clone derived by core::clone::Clone, replace it with an identity impl
  • when we see an impl for a Debug derived by core::fmt::macros::Debug, replace it with a dummy impl (e.g. a constant string)

Such transformations should be a user setting, both in the CLI and Cargo.toml, see #248.
This setting could be a list of rules for rewriting a matching block of code with another (possibly empty) block of code.

For now, we just drop the automatically derived impl blocks.

bors bot added a commit that referenced this issue Jun 5, 2023
106: Add support for attributes & expn_data on items (fixes #49, fixes #88) r=franziskuskiefer a=W95Psp

This also makes #45 trivial to implement

~This is draft because I removed the quick & dirty filter implemented in #94, thus I now need to restore the functionality.~
 - ~[ ] when we see an `impl` for a `Clone` derived by `core::clone::Clone`, replace it with an identity impl~
 - ~[ ] when we see an `impl` for a `Debug` derived by `core::fmt::macros::Debug`, replace it with a dummy impl (e.g. a constant string)~

I restored a filter similar to what I did in #94: we skip every automatically_dervied items. Issue #108 keeps track of the progress on writing a better filter, so that this PR is smaller.

Co-authored-by: Lucas Franceschino <lucas.franceschino@inria.fr>
bors bot added a commit that referenced this issue Jun 6, 2023
106: Add support for attributes & expn_data on items (fixes #49, fixes #88) r=W95Psp a=W95Psp

This also makes #45 trivial to implement

~This is draft because I removed the quick & dirty filter implemented in #94, thus I now need to restore the functionality.~
 - ~[ ] when we see an `impl` for a `Clone` derived by `core::clone::Clone`, replace it with an identity impl~
 - ~[ ] when we see an `impl` for a `Debug` derived by `core::fmt::macros::Debug`, replace it with a dummy impl (e.g. a constant string)~

I restored a filter similar to what I did in #94: we skip every automatically_dervied items. Issue #108 keeps track of the progress on writing a better filter, so that this PR is smaller.

Co-authored-by: Lucas Franceschino <lucas.franceschino@inria.fr>
@W95Psp W95Psp added the engine Issue in the engine label Jun 6, 2023
@franziskuskiefer franziskuskiefer moved this to Todo in hax Aug 22, 2023
@W95Psp W95Psp added the P2 Medium priority label Jan 2, 2024
Copy link

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 18, 2024
Copy link

This issue has been closed due to a lack of activity since being marked as stale. If you believe this issue is still relevant, please reopen it with an update or comment.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2024
@karthikbhargavan
Copy link
Contributor

In most cases, we only need these derived impls in interfaces, so a potential solution may be to implement #1028

@github-actions github-actions bot removed the stale label Nov 6, 2024
@W95Psp
Copy link
Collaborator Author

W95Psp commented Nov 12, 2024

This is related to #1113.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issue in the engine P2 Medium priority
Projects
No open projects
Status: Todo
Development

No branches or pull requests

2 participants