Doc-comments inside using groups

e74d4f0
Opened by Stanislav Tkach at 2019-09-02 12:52:45

The following is currently not permitted:

pub use third_party::{
    /// Doc-comment explaining reexported entity.
    some_function,
    // Normal comments are allowed, though.
    some_other_function,
};

I'm very fond of group usings, so I prefer to use them everywhere, but it is impossible in situations where the documentation is needed (we have encountered this problem here, by the way).

  1. I think this requires a dedicated RFC to outer attributes on that location.

    Ryan Scheel at 2018-07-03 02:40:46

  2. @Havvy Makes sense, but I'm not ready to take it on myself. I hope someone will be interested in writing an RFC.

    Stanislav Tkach at 2018-07-03 14:53:06

  3. We don't even display docs on use statements to begin with, so that would need to happen as well.

    I don't think allowing attributes inside a grouped use statement requires an RFC, per se, but it will need to be explicitly added. @rust-lang/compiler?

    QuietMisdreavus at 2018-08-23 18:39:19

  4. +1 for allowing attributes on use-statement subitems/groups.

    Taylor Cramer at 2018-08-23 18:43:41

  5. I'm intrigued at what docs on imports would look like in the rendered docs. I can see the point for reexports (pub use), but not for the general case (other than in the code itself, at which point they are just comments).

    Esteban Kuber at 2018-08-23 19:57:29