E4100

E4100#

The type is not a trait.

This error occurs when you define an alias for a type and use it as a trait. As it is impossible to use a type as a trait, this error might hint at a typo in your code.

Erroneous example#

///|
pub struct Original(Int)

///|
type Alias = Original

///|
pub trait Trait: Alias {
  //         ^~~~~
  // Error: The type Alias is not a trait
}

Suggestion#

If there is a typo, use a correct trait where the error occurs.

///|
pub trait Original {
  to_int(Self) -> Int
}

///|
pub trait Trait: Original {
  to_int(Self) -> Int
}

Only traits can appear after : in a trait declaration.