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

Functions marked with #[export] should not throw warnings if unused #6525

Open
TomAFrench opened this issue Nov 15, 2024 · 0 comments
Open
Assignees

Comments

@TomAFrench
Copy link
Member

TomAFrench commented Nov 15, 2024

Similar to how we handle #[test] functions we may want these without making them importable by any dependant crates.

#[export]
fn bench_test(mut x: Field) -> Field {
    for _ in 0..100 {
        x *= x;
    }
    x
}

This currently warns with

$ nargo export
warning: unused function bench_test
  ┌─ src/lib.nr:8:4
  │
8 │ fn bench_test(mut x: Field) -> Field {
  │    ---------- unused function
  │
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants