Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Doc comments on links #153

Closed
kw217 opened this issue Jun 2, 2017 · 2 comments
Closed

Doc comments on links #153

kw217 opened this issue Jun 2, 2017 · 2 comments

Comments

@kw217
Copy link
Contributor

kw217 commented Jun 2, 2017

The current error_chain! macro permits doc comments on errors, but not on links:

    error_chain!{
        links {
            /// Doc comment for links
            LinkedError(super::databases::Error, super::databases::ErrorKind);
        }
    }

yields

error: expected ident, found #
  --> src/lib.rs:11:13
   |
11 |             /// Doc comment for links
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^

whereas doing similarly for an error in errors works just fine.

See a full failing example here - if line 11 is a normal comment, the compiler emits a warning; if it's a doc comment, it fails.

@Yamakaky
Copy link
Contributor

Yamakaky commented Jun 3, 2017

Yeah I know, see #63 (the comments are converted to the #[doc = ...] form. If you find a working solution, I take it!

@Yamakaky Yamakaky closed this as completed Jun 3, 2017
@kw217
Copy link
Contributor Author

kw217 commented Jun 5, 2017

Thanks, sorry for duplicating!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants