Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#[derive(IsVariant)] clashes with #![deny(missing_docs)] #159

Closed
snowpoke opened this issue Apr 26, 2021 · 2 comments · Fixed by #179
Closed

#[derive(IsVariant)] clashes with #![deny(missing_docs)] #159

snowpoke opened this issue Apr 26, 2021 · 2 comments · Fixed by #179

Comments

@snowpoke
Copy link

snowpoke commented Apr 26, 2021

Trying to run the following code

#![deny(missing_docs)]
//! Documented crate.
use derive_more::IsVariant;

/// Documented enum.
#[derive(IsVariant)]
pub enum Documented{
    /// Documented variant
    Foo,
    /// Documented variant
    Bar,
}

will result in two errors,

missing documentation for an associated function rustc(missing_docs) [6,10]
missing documentation for an associated function rustc(missing_docs) [6,10]

I assume that's a bug on the side of derive_more? At the moment my only workaround is to #![allow(missing_docs)] the entire module, which is a bit unfortunate.

(This is my first filed issue on GitHub btw, I hope I did this right 😳 )

@Technohacker
Copy link
Contributor

Can confirm the same with the Unwrap derive as well

@JelteF
Copy link
Owner

JelteF commented Dec 21, 2021

A pull request to fix this is definitely welcome.

JelteF added a commit that referenced this issue Feb 8, 2022
Prevents a linting issue from `missing_docs` on the derived functions

Solves #159

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants