OxL Справочник OxL
РусскийEnglish

warning unused

warning Стандарт: [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✓ проверяется в CI
use std.time { Duration }      // <- unused

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

How to fix#

oxl✓ проверяется в 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 · Версия документации 1.0.0-beta© OxwaldLink · сгенерировано из Стандарта, исходников std и руководства