Skip to content

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

@TomAFrench

Description

@TomAFrench

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
  │

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions