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

lang: Remove unused code related to deprecated program id macros #3170

Conversation

acheroncrypto
Copy link
Collaborator

Problem

rustc 1.82.0-nightly prints some warnings related to unused code:

   Compiling anchor-attribute-account v0.30.1 (/home/x/anchor/lang/attribute/account)
warning: function `deprecated_id_to_tokens` is never used
  --> /home/x/anchor/lang/attribute/account/src/id.rs:75:4
   |
75 | fn deprecated_id_to_tokens(
   |    ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: struct `IdDeprecated` is never constructed
   --> /home/x/anchor/lang/attribute/account/src/id.rs:146:8
    |
146 | struct IdDeprecated(proc_macro2::TokenStream);
    |        ^^^^^^^^^^^^

warning: struct `ProgramSdkId` is never constructed
   --> /home/x/anchor/lang/attribute/account/src/id.rs:168:8
    |
168 | struct ProgramSdkId(proc_macro2::TokenStream);
    |        ^^^^^^^^^^^^

warning: struct `ProgramSdkIdDeprecated` is never constructed
   --> /home/x/anchor/lang/attribute/account/src/id.rs:189:8
    |
189 | struct ProgramSdkIdDeprecated(proc_macro2::TokenStream);
    |        ^^^^^^^^^^^^^^^^^^^^^^

warning: struct `Pubkeys` is never constructed
   --> /home/x/anchor/lang/attribute/account/src/id.rs:258:8
    |
258 | struct Pubkeys {
    |        ^^^^^^^

warning: `anchor-attribute-account` (lib) generated 5 warnings

Summary of changes

Remove unused code related to the deprecated program id macros.

This is not a breaking change since all of the removed code was private.

Copy link

vercel bot commented Aug 14, 2024

@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added lang fix Bug fix PR labels Aug 14, 2024
@acheroncrypto acheroncrypto merged commit d6b6ac7 into coral-xyz:master Aug 14, 2024
0 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PR lang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant