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

Closed
TomAFrench opened this issue Nov 15, 2024 · 0 comments · Fixed by #6625
Closed

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

TomAFrench opened this issue Nov 15, 2024 · 0 comments · Fixed by #6625
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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants