-
Notifications
You must be signed in to change notification settings - Fork 243
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
Exported structs and globals are marked as unused #6250
Comments
@asterite Are we marking structs as unused before macros run? |
Ah, nvm. This is a different kind of exported. |
So is the rule that if there's #[abi(...)]` on top of a struct then it shouldn't warn if it's unused? |
Yeah, this annotation marks that we should create a template for that struct type in the ABI. Similarly for globals, it puts the value of those in the ABI. |
In the example above, I guess |
Yeah, we should mark anything reachable from these structs as used. |
# Description ## Problem Part of #6250 ## Summary Also renames a method to have a clearer name. ## Additional Context ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
# Description ## Problem Resolves #6250 ## Summary ## Additional Context ## Documentation Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
Aim
This code generates warnings for unused structs and globals
Expected Behavior
Being able to generate the exports without warnings being emitted
Bug
Warnings are generated
To Reproduce
Use the example above
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: