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

error bad-import-root

error Стандарт: [§2.2]

Первый сегмент пути импорта недопустим.

What it means#

The first segment of an import path MUST be std, self, super, or the name of a dependency declared in oxl.toml (§2.2). Anything else, including a sibling module name written without self, is rejected.

Example#

oxl✓ проверяется в CI
use utils { helper }      // <- bad-import-root (utils is neither a dependency nor prefixed with self)

fn main() {}
error
bad-import-root

How to fix#

oxl
use self.utils { helper }

fn main() {}

Prefix modules of your own package with self. (or super. for the parent module). For external code add the package to [deps] in oxl.toml and import it by its dependency name.

See also#

OxL 1.0.0-beta · Версия документации 1.0.0-beta© OxwaldLink · сгенерировано из Стандарта, исходников std и руководства