Skip to content

Redo PR #24811 properly #24825

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

Merged
merged 2 commits into from
Apr 26, 2015
Merged

Redo PR #24811 properly #24825

merged 2 commits into from
Apr 26, 2015

Conversation

hanna-kruppe
Copy link
Contributor

Transplant the relevant changes (turns out to be all of them) to grammar.md, and remove all grammar talk from reference.md. Sorry for the chaos.

The second commit, further below, goes over the comments and whitespace sections.

r? @steveklabnik

Transplant the grammar-related changes to grammar.md,
and remove all grammar talk from reference.md
@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 25, 2015

📌 Commit 85ee89a has been approved by steveklabnik

@steveklabnik
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Apr 25, 2015

📌 Commit d8d5a2f has been approved by steveklabnik

Comments in Rust code follow the general C++ style of line and block-comment
forms. Nested block comments are supported.
Comments in Rust code follow the general C++ style of line (`//`) and
block-comment (`/* ... */`) forms. Nested block comments are supported.

Line comments beginning with exactly _three_ slashes (`///`), and block
comments beginning with exactly one repeated asterisk in the block-open
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does /// Foo really expand to #[doc = "/// Foo"]? @chris-morgan states it expands to #[doc = " Foo"].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I see no reason why Chris Morgan would be wrong. I just didn't think to try it out (honestly didn't even see the triple slash!). I'm currently in the middle of a build, so I can't even check...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh, rustc --pretty does not show any #[doc] attributes, it just regurgitates the triple-slash comments. I don't know how else to test this, since I never worked on the compiler. But since it's clearly not visible for users or ordinary Rust code, I'm fine to say that this doesn't really matter. But since section 6.3.7 (Miscellaneous attributes) does strip the triple slashes, I'll remove them here too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. What it says seems kinda weird though. You could probably try manually inputting it like: #[doc = "/// Foo"] and see what rustdoc spits out. That might clarify it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#[doc = "/// Foo"] results in rustdoc spitting out "/// Foo" as documentation text, so Chris Morgan is definitely right (and by extension, so is my change, yay!).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is purely an implementation detail for now, as far as I'm concerned.

@steveklabnik
Copy link
Member

@bors: r-

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 26, 2015

📌 Commit 0ea193d has been approved by steveklabnik

bors added a commit that referenced this pull request Apr 26, 2015
Transplant the relevant changes (turns out to be all of them) to `grammar.md`, and remove all grammar talk from `reference.md`. Sorry for the chaos.

The second commit, further below, goes over the comments and whitespace sections.

r? @steveklabnik
@bors
Copy link
Collaborator

bors commented Apr 26, 2015

⌛ Testing commit 0ea193d with merge 61a5e46...

@bors
Copy link
Collaborator

bors commented Apr 26, 2015

@bors bors merged commit 0ea193d into rust-lang:master Apr 26, 2015
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

Successfully merging this pull request may close these issues.

4 participants