Skip to content

Use #[automatically_derived] in all generated code #814

@clechasseur

Description

@clechasseur

I am using serde_with in a small project and am seeing missing line coverage in my code coverage report, pointing to my #[derive] directives. Apparently, this can be avoided by adding the #[automatically_derived] attribute to generated code.

I've done a quick search in this repository and it seems to be used already for some generated code, so I can only assume there are places it isn't used yet (I'm not very familiar with derive macro implementation so I can't be certain 🙂).

Here's an example of how I use serde_with:

https://github.com/clechasseur/aoc_leaderbot/blob/fa643db51d692821b01c9094007f2434b1ecc371/aoc_leaderboard/src/aoc.rs#L40

This is not high-priority for me as I am just poking around a toy project, but I thought I'd report it in any case. If I can be of further assistance, don't hesitate to ask.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions