Skip to content

Trailing doc comments #16816

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

Closed
bharrisau opened this issue Aug 28, 2014 · 2 comments
Closed

Trailing doc comments #16816

bharrisau opened this issue Aug 28, 2014 · 2 comments

Comments

@bharrisau
Copy link
Contributor

Not sure if this is big enough for a RFC, or if it is unwanted as it adds to the problem in #6782.

In Zinc, we have been trialling a different doc comment syntax to make marking up our struct-like macros a little nicer (https://github.com/hackndev/zinc/blob/master/ioreg/ioreg.rs#L129).

The //= attaches to the previous field, such that

struct Foo {
  foo1: bool, //= Doc comment
  foo2: bool  //= Doc comment2
}

is the same as

struct Foo {
  /// Doc comment
  foo1: bool,
  /// Doc comment 2
  foo2: bool
}

Something to consider?

@steveklabnik
Copy link
Member

It would need an RFC, and we already have six kinds of comment. Not sure another one is worth it.

@steveklabnik
Copy link
Member

Yes, please persue an RFC if you'd still like to try to get this into Rust.

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

No branches or pull requests

2 participants