[BREAKING] Remove derive(*)
greyblake opened this issue · 1 comments
greyblake commented
It was controversial experiment from the very beginning.
At this point we want to get rid of it.
Context
At the moment in version 0.3.1 it's possible to derive traits with #[derive(*)]
, where *
means traits that make sense "by default".
You can find those traits be search for fn unfold_asterisk_traits
in the code.
Spec
- In crate
nutype_macros
- Remove code related to parsing
*
inderive
and the logic that unfolds it. - Generate a friendly message at compile time, saying that
#[derive(*)]
is no longer possible. - Adjust all the tests that are necessary (run all tests with
make test
) - Add a note in the CHANGELOG about the breaking change
Acceptance Criteria
I have the following code:
#[nutype()]
#[derive(*)]
pub struct Name(String);
It does not compile. Th error message points to
#[derive(*)]
^
The same applies if the inner type is integer of float.