You tried to use something which is not a trait in a trait position, such as a bound or impl.
Erroneous code example:
struct Foo; struct Bar; impl Foo for Bar {} // error: `Foo` is not a trait
Another erroneous code example:
struct Foo; fn bar<T: Foo>(t: T) {} // error: `Foo` is not a trait
Please verify that you didn‘t misspell the trait’s name or otherwise use the wrong identifier. Example:
trait Foo {
// some functions
}
struct Bar;
impl Foo for Bar { // ok!
// functions implementation
}
or
trait Foo {
// some functions
}
fn bar<T: Foo>(t: T) {} // ok!