Open
Description
These are code improvements or features that could be added in the future if demand is there:
- Revive Implement Ord for mem::Discriminant rust-lang/rust#51561, which would get rid of the
nightly
crate feature and remove parts of thesafe
crate feature implementation. - Improve safe
PartialOrd
andOrd
codegen, done in Improve code generation ofOrd
andPartialOrd
#38. - Implement
#[derive_where(Clone; T = u8)]
, which will generateimpl Clone for Test<u8>
. - Crate feature to disable warnings, currently errors that don't prevent derive-where from functioning correctly but point to invalid use-cases (use std
derive
) instead or bad code quality (empty bracers). Currently Rust doesn't have acompile_warn
. - Remove
quote
and build any Rust code purely with syn structures instead. - Improve generated code, mainly remove
match
and access fields directly when not dealing with an enum. This is mainly modeled after std'sderive
, which was probably done to make it easy to implement as it makes code generation between enums and structs very similar, but after many refactors, there is no real advantage anymore. - Use once-cell or something similar to cache patterns and
Ident
s, some implementation don't need them, but we don't want to generate them ad-hoc as they do some allocations. The main concern here is adding another dependency. - Use arrayvec or something similar to store traits, reducing overall allocations. We know what the maximum amount of possible traits are, no need to do any allocations. To reduce dependencies we could make our own.
- Use smallvec or something similar to store fields and such, we don't expect structs to have an unlimited amount of fields. Again, another dependency.