1 An inherent implementation was defined for a type outside the current crate.
3 Erroneous code example:
6 impl Vec<u8> { } // error
9 You can only define an inherent implementation for a type in the same crate
10 where the type was defined. For example, an `impl` block as above is not allowed
11 since `Vec` is defined in the standard library.
13 To fix this problem, you can do either of these things:
15 - define a trait that has the desired associated functions/types/constants and
16 implement the trait for the type in question
17 - define a new type wrapping the type and define an implementation on the new
20 Note that using the `type` keyword does not work here because `type` only
21 introduces a type alias:
26 impl Bytes { } // error, same as above