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

API Docs: macros #29381

Closed
steveklabnik opened this Issue Oct 26, 2015 · 5 comments

Comments

Projects
None yet
5 participants
@steveklabnik
Member

steveklabnik commented Oct 26, 2015

Part of #29329

http://doc.rust-lang.org/std/#macros

Here's what needs to be done to close out this issue:

  • assert could use links to panic!, and "This macro has a second version," should be about one and two argument forms, not "versions". In general, these docs could use some headers for each bit, rather than the rambly style they're in now.
  • assert_eq could use links to assert!, also dropping the (). same deal with "versions" too. Mentioning its relationship to PartialEq would be nice.
  • assert_ne has the same issues as assert_eq!.
  • column needs to drop the ()s, and doesn't explain why you might care about the column that it was invoked in.
  • debug_assert needs a bunch of links, and should really end up mostly pointing to the docs of assert.
  • debug_assert_eq same as debug_assert, that is, should mostly point to assert_eq.
  • debug_assert_ne, same as the two previous.
  • file! same as column!
  • format! this macro is very useful and has very little docs, what a shame! It should have a lot more, at least pointing out that it's a common way to concatenate a lot of strings, for example.
  • format_args could use a lot of work, mostly expanding on what it is and why it's there.
  • include this macro explains why it's bad but then doesn't show an example. It should.
  • line! similar to column!
  • option_env! needs links to Option<T>
  • panic! has anemic docs for something so heavily used!
  • print! could use a bunch of links
  • println! could use links
  • thread_local should link when it mentions LocalKey, not at the end.
  • try! should be a little more strongly worded about ? and should show examples of their equivalence.
  • unreachable! should discuss how it's different than the intrinsic.
  • vec! could use a lot of links and some more text.
  • write! has just... awkward docs. It's a weird macro, so that's why, but it could use re-done, IMHO.
  • writeln should mostly link to write! and point out that it's the same but with the extra newline.
@durka

This comment has been minimized.

Contributor

durka commented Oct 28, 2015

Not sure it's within the scope of this issue (since this is about the content), but see #26560.

@steveklabnik

This comment has been minimized.

Member

steveklabnik commented Mar 8, 2017

I am happy to mentor anyone who wants to tackle this issue.

@dpen2000

This comment has been minimized.

dpen2000 commented Mar 24, 2017

I'll take a look at these @steveklabnik

@steveklabnik

This comment has been minimized.

Member

steveklabnik commented Mar 24, 2017

@dpen2000 awesome! Let me know if you need anything 😄

SamWhited added a commit to SamWhited/rust that referenced this issue Mar 30, 2017

Improve the docs for the write and writeln macros
This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner.

Updates rust-lang#29329, rust-lang#29381

SamWhited added a commit to SamWhited/rust that referenced this issue Mar 30, 2017

Improve the docs for the write and writeln macros
This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner.

Updates rust-lang#29329, rust-lang#29381

SamWhited added a commit to SamWhited/rust that referenced this issue Mar 30, 2017

Improve the docs for the write and writeln macros
This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner.

Updates rust-lang#29329, rust-lang#29381

Remove extra macro ! in docs

SamWhited added a commit to SamWhited/rust that referenced this issue Mar 30, 2017

Improve the docs for the write and writeln macros
This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner.

Updates rust-lang#29329, rust-lang#29381

frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 31, 2017

Rollup merge of rust-lang#40934 - SamWhited:improve_write_writeln_doc…
…s, r=steveklabnik

Improve the docs for the write and writeln macros

This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner (I hope; feedback would be welcome).

Updates rust-lang#29329, rust-lang#29381

frewsxcv added a commit to frewsxcv/rust that referenced this issue Mar 31, 2017

Rollup merge of rust-lang#40934 - SamWhited:improve_write_writeln_doc…
…s, r=steveklabnik

Improve the docs for the write and writeln macros

This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner (I hope; feedback would be welcome).

Updates rust-lang#29329, rust-lang#29381

michaelwoerister added a commit to michaelwoerister/rust that referenced this issue Apr 7, 2017

Improve the docs for the write and writeln macros
This change reduces duplication by linking the documentation for
`writeln!` to `write!`. It also restructures the `write!` documentation
to read in a more logical manner.

Updates rust-lang#29329, rust-lang#29381
@citizen428

This comment has been minimized.

Contributor

citizen428 commented Jun 3, 2017

@steveklabnik Seems like write! and writeln! docs have been merged now, please update the original checklist.

I'll try to work through assert, assert_eq and assert_ne tomorrow.

citizen428 added a commit to citizen428/rust that referenced this issue Jun 6, 2017

frewsxcv added a commit to frewsxcv/rust that referenced this issue Jun 7, 2017

nagisa added a commit to nagisa/rust that referenced this issue Jun 8, 2017

alexcrichton added a commit to alexcrichton/rust that referenced this issue Aug 30, 2017

Rollup merge of rust-lang#44160 - AndyGauge:api-docs-macros, r=stevek…
…labnik

API docs: macros.  Standard Documentation Checklist

Fixes rust-lang#29381
r? @steveklabnik

alexcrichton added a commit to alexcrichton/rust that referenced this issue Aug 30, 2017

Rollup merge of rust-lang#44160 - AndyGauge:api-docs-macros, r=stevek…
…labnik

API docs: macros.  Standard Documentation Checklist

Fixes rust-lang#29381
r? @steveklabnik

@bors bors closed this in #44160 Aug 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment