tailhook/quick-error

quick_error macro emits "doc comment not used by rustdoc"

Marwes opened this issue · 4 comments

Putting doc comments on the variants in the quick_error macro causes rustc to emit warnings despite the comments actually appearing in rustdoc. https://docs.rs/gluon/0.5.0/gluon/enum.Error.html

quick_error! {
    #[derive(Debug, PartialEq)]
    pub enum Error {
        /// Some comment
        Error(err: String) {
            display("{}", err)
        }
    }
}

I guess this is because the doc comments/attributes gets attached to something that rustdoc does not use in addition to some place which it does use. Would it be possible to supress the warnings in the macro itself or should it be supressed on the call-site?

Sorry, I don't see the warning. Any way to reproduce it? Is it for some older rust version? Or should I enable any extra warnings?

Did you test it on nightly? Should have mentioned that it is a new warning.

Ah, now I see. Added suppression attributes. Should be fixed now, will upload the update on crates.io soon.

Released as v1.2.1