Skip to content

[unstable option] wrap_comments #3347

Open
1 of 17 issues completed
Open

Description

@scampi

Tracking issue for unstable option: wrap_comments

Activity

  1. changed the title [-][unstable option] unstable option: wrap_comments[/-] [+][unstable option] wrap_comments[/+] on Feb 18, 2019
  2. carllerche commented on May 10, 2019

    @carllerche

    What is left to stabilize this?

  3. scampi commented on May 16, 2019

    @scampi
    ContributorAuthor

    There is now a documented process describing stabilisation so we'd have to go through the conditions set there.

  4. benbrittain commented on Oct 28, 2019

    @benbrittain
    Contributor

    Is there a link to the stabilization process? I can't find it from the README.

    I'd like to see us go through this process for the wrap_comments feature

  5. calebcartwright commented on Oct 28, 2019

    @calebcartwright
    Member

    The process for stabilizing options is defined in https://github.com/rust-lang/rustfmt/blob/master/Processes.md

    @scampi & @topecongiro - correct me if I'm wrong but my understanding is that the current focus is on rustfmt 2.0, and that stabilization of some of these currently-unstable config options won't come til after the 2.0 release (based on https://github.com/rust-lang/rustfmt/projects/2)

  6. jhpratt commented on Oct 31, 2020

    @jhpratt
    Member

    FWIW while I'd like to see this stabilized, this option can also break markdown. Last time I tried, a large markdown table I had was wrapped, which meant it was no longer valid markdown.

  7. bitdivine commented on Nov 9, 2020

    @bitdivine

    Is there a way of saying "Do not wrap this comment"? We have a similar problem with long maths formulae. It's not a blocker, it just takes a bit of effort to fix up the formulae afterwards, however it would be nice if we could make exceptions for some blocks of text. I suppose the markdown could be checked programatically before and after each conversion and the formatting could be skipped if the markdown is broken. That won't catch the formulae but it might help in your case @jhpratt . Maybe there is a nice markdown formatter out there in the wild that understands when it is looking at a table.

  8. daniel5151 commented on Dec 7, 2020

    @daniel5151

    Any updates on this?

  9. jhpratt commented on Dec 7, 2020

    @jhpratt
    Member

    @daniel5151 Updates are posted as they come in. What you see in this thread is the current status.

  10. Nemo157 commented on Dec 16, 2020

    @Nemo157
    Contributor

    Would it be plausible to split this into wrap_comments and wrap_doc_comments, and make wrap_doc_comments markdown aware?

  11. calebcartwright commented on Dec 17, 2020

    @calebcartwright
    Member

    Would it be plausible to split this into wrap_comments and wrap_doc_comments, and make wrap_doc_comments markdown aware?

    Could you elaborate a bit on the motivation? Is it just about wanting wrap_comments stabilized more quickly or are there cases where you'd want to wrap doc comments but not other comments or vice versa?

  12. Nemo157 commented on Dec 17, 2020

    @Nemo157
    Contributor

    I actually don't care about normal comments much, I want to be able to have rustfmt wrap my doc comments. My thought was that normal comments aren't required to be markdown, so it would make sense to split the implementation.

  13. jhpratt commented on Dec 21, 2020

    @jhpratt
  14. calebcartwright commented on Dec 21, 2020

    @calebcartwright
  15. 24 remaining items

  16. honestlysamuk commented on Jul 10, 2026

    @honestlysamuk

    I found a bug using this feature flag where it involved comment blocks. There were occasions where I had something like

    // a really long comment that goes over my comment_width value immediately followed by a code block
    // ```
    // some code
    // ```
    
    

    which then transformed to

    // a really long comment that goes over my comment_width value
    // immediately followed by a code block```
    // some code
    // ```
    

    I think that this is the markdown aware part of the doc comment above. Clippy then lints our docs and warns on this.

  17. JanDiederich commented on Oct 24, 2026

    @JanDiederich
  18. ytmimi commented on Oct 24, 2026

    @ytmimi
  19. locked and limited conversation to collaborators on Oct 24, 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-wrap_commentsUnstable option: wrap_commentsunstable-optionTracking issue of an unstable option

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions