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-whereforDebugandClone, and tried to upgrade to 1.5 to use the newserdederivation 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
serdefeature ofderive-where, without any further changes, this code stops compiling. In this PR, you can see that just runningcargo build --testscompiles fine, butcargo build --tests --features serdefails. 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-whereforserdefixes the compilation.Update: Could this be cause by
serdeattribute being processed byderive-whereeven ifSerialize/Deserializeare not derived with it?