This error indicates that a #[non_exhaustive] attribute was incorrectly placed on something other than a struct or enum.

Examples of erroneous code:

#[non_exhaustive]
trait Foo { }