Skip to main content

E0017: Unknown Namespace

You referenced a namespace that hasn't been defined.

Example

fn main() {
let s = Status::Active; // Error: unknown namespace `Status`
}

How to fix

Define the namespace before using it. enum definitions are one way to create a namespace:

enum Status {
Active,
Inactive,
}

fn main() {
let s = Status::Active; // OK
}

Or check for typos in the enum name.