-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Six forms of doc comments are five too many #6782
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
Comments
I'd say remove the block ones, only allow the inner line ones for modules, only allow the outer line ones for everything else, remove/lint-off the attribute ones. |
@Kimundi if we are to remove a form, I'd prefer removing the line form. Most of the issues relating to doc comments are only applicable to the line form because ultimately, they aren't suited to formatting a block of text. Also, the block form is more consistent with other languages. |
In order to avoid making only one kind of comment special, I suggest not having any comments be special, and instead having something like:
Module comments could be denoted by starting them with four hashes instead of three. |
Aw, I liked line comments. Maybe |
I don't consider the attribute a doc comment since it isn't a comment. I don't think this is really a big issue at all, but I wouldn't mind seeing line comments gone. |
After some discussion on irc today, I'd like to make an alternative proposal: Don't remove any of the existing forms, but instead
This would at least solve the ambiguity problems. |
@cmr: Ah right, that's technical still a doc attribute, isn't it. ;) But yeah, one name-value pair only. |
Triage bump. I haven't seen any uses of |
This issue has been moved to the RFCs repo: rust-lang/rfcs#287 |
README: Add subsection on running Clippy as a rustc wrapper This is useful for projects that do not use cargo. changelog: README: Add subsection on running Clippy as a rustc wrapper
Currently we have six forms of doc comments:
///
/** */
//!
/*! */
#[doc=""]
#[doc="";]
Ideally this would be reduced to one, but if two are necessary then that's fine. It's perfectly acceptable to not cater to every miniscule style convention. Here is my proposal:
Alternatively, we could conclude that it's simply too much trouble to have special forms for doc comments and just stick with the attribute forms. This would be somewhat uglier, but more consistent with the rest of the language
The text was updated successfully, but these errors were encountered: