rust-derivative
rust-derivative copied to clipboard
Using `derive(Derivative)` with no further attribute should be an error
Eg.
#[derive(derivative::Derivative)]
struct Error;
should not compile. Less contrived example:
#[derive(derivative::Derivative)]
#[derive(Clone)] // user probably meant to use `#[derivative(Clone)]` here
struct Error;
For instance, the following:
#[derive]
struct Error;
generates
error: malformed `derive` attribute input
--> src/lib.rs:1:1
|
1 | #[derive]
| ^^^^^^^^^ help: missing traits to be derived: `#[derive(Trait1, Trait2, ...)]`