OxL Reference

warning unused

warning Standard: [III.4]

What it means#

An import, a local variable or a dependency in [deps] is never used (§2.2, part III.4). Besides the noise, an unused dep pulls code into the build for no reason. This is a warning by default, configurable in [lint].

Example#

oxl✓ checked in CI
use std.time { Duration }      // <- unused

fn main() {
  print("hi")
}
error
unused

How to fix#

oxl✓ checked in CI
fn main() {
  print("hi")
}

Delete the declaration, or use it. Names that are intentionally unused may be started with _.

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides