Confusing error when #[getset(get_copy = "pub")]
is specified but not derive(CopyGetters)
#67
Labels
#[getset(get_copy = "pub")]
is specified but not derive(CopyGetters)
#67
When
#[getset(get_copy = "pub")]
is specified butCopyGetters
is not derived (onlyGetters
), the proc-macro doesn't give an error, instead rustc gives the error thatfoo.bar()
is not a method but a field.Solution: The proc-macro could give an error. But I'd prefer another solution:
Remove
CopyGetters
altogether, only haveGetters
, such thatget_copy
works whenGetters
is derived. This makes much more sense IMO.Or is there a reason to require the user to derive
CopyGetters
/ any disadvantages whenget_copy
is also allowed withGetters
?To me it seems to be more verbose / requiring more typing than necessary, and I often forget to derive
CopyGetters
.The text was updated successfully, but these errors were encountered: