Skip to content

API Docs: macros #29381

Closed
Closed
@steveklabnik

Description

@steveklabnik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCE-help-wantedCall for participation: Help is requested to fix this issue.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions