Compilation errors when enabling the serde
feature
#122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my crate I was previously using
derive-where
forDebug
andClone
, and tried to upgrade to 1.5 to use the newserde
derivation as well. The test in the PR is a simplified extract from my code. Theserde(bound)
stuff is what I was hoping to get rid of.The problem is, when just enabling the
serde
feature ofderive-where
, without any further changes, this code stops compiling. In this PR, you can see that just runningcargo build --tests
compiles fine, butcargo build --tests --features serde
fails. The errors are:(in the original code, since there's no need for
serde(crate)
, it's the same error but aboutserde(bound)
)and
Not sure what is happening here. I am going to try and find a workaround for my code.
Update: removing
serde(bound)
and switching toderive-where
forserde
fixes the compilation.Update: Could this be cause by
serde
attribute being processed byderive-where
even ifSerialize/Deserialize
are not derived with it?