Skip to content

[unstable option] normalize_doc_attributes #3351

Open
0 of 2 issues completed
Open

Description

@scampi

Tracking issue for unstable option: normalize_doc_attributes

Activity

  1. changed the title [-][unstable option] unstable option: normalize_doc_attributes[/-] [+][unstable option] normalize_doc_attributes[/+] on Feb 18, 2019
  2. burrbull commented on Jul 27, 2019

    @burrbull

    Are there issues that block stabilization of the feature?

  3. Robbepop commented on Jun 5, 2020

    @Robbepop

    Are there issues that block stabilization of the feature?

    bump

    I'd be very interested to have this stabilized.
    Normalization formatting is a very important aspect of formatting. But not only for readability but especially for tools. For example, imagine a tool to test if the output of a proc. macro is correct, e.g. in case of https://docs.rs/synstructure/0.12.3/synstructure/macro.test_derive.html. It is best to first format both, actual and expected quotes and especially normalize them to make writing concrete expectation tests for these proc. macro tests less daunting. E.g. common problems is that you suffer while writing such tests because of missing or overflous , or other things that should have been normalized anyways since they do not really matter for the underlying macro expansion semantics.

  4. added this to the 2.1.0 milestone on Jun 29, 2020
  5. jonathanpallant commented on May 24, 2022

    @jonathanpallant

    I'd like to see this stabilised. When autogenerating source code, #[doc(...)] is a more predictable thing to emit, because it is not newline terminated. This means your codegen care emit zero newlines and care nothing about indentation. rustfmt can put that all back ... but currently you are still left with #[doc(...)] format comments and they are just less readable (to me at least) than /// comments.

    Having this stabilised would allow codegen to use '#[doc(...)]` but humans not have to deal with it in the generated output.

  6. burrbull commented on May 24, 2022

    @burrbull
  7. ytmimi commented on May 24, 2022

    @ytmimi
    Contributor

    @jonathanpallant you can find more details about the configuration stabilization process here. We're not quite ready to stabilize this option just yet.

    @burrbull thanks for linking that issue. Here's another I was able to find in the issue tracker (#4879). There may be other issues so it would be a great help if anyone who's interested in having this stabilized could track those down and cross link them here. Verifying whether old issues are unresolved or opening PRs for them also goes a long way if anyone has the bandwidth and interest!

  8. added
    S-tracking-needs-summaryStatus: It's hard to tell what's been done and what hasn't! Someone should do some investigation.
    on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-tracking-needs-summaryStatus: It's hard to tell what's been done and what hasn't! Someone should do some investigation.UO-normalize_doc_attributesUnstable option: normalize_doc_attributesunstable-optionTracking issue of an unstable option

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions