Skip to content

inconsistent behavior of wrap_comments (merges short lines in lists) #5836

Open

Description

@xxchan
 /// a
 ///    b
 ///
 /// a
 /// b
 ///
 /// - a
 /// b
-/// - a
-///   b
+/// - a b
 fn main() {}

Why is only the last one wrapped? Is this expected behavior, or limitation of the implementation?

rustfmt 1.6.0-nightly (0e8e857b 2023-07-16)

Activity

  1. changed the title [-]inconsistent behavior of `wrap_comments`[/-] [+]inconsistent behavior of `wrap_comments` (on lists)[/+] on Jul 17, 2023
  2. xxchan commented on Jul 17, 2023

    @xxchan
    ContributorAuthor
    This is wrapped (we don't want 🤔️)
        // 1. logical_scan ->  logical_join
        //                      /        \
        //                index_scan   primary_table_scan
    
    But this is not.
        //    logical_scan ->  logical_join
        //                      /        \
        //                index_scan   primary_table_scan
    
  3. xxchan commented on Jul 17, 2023

    @xxchan
    ContributorAuthor

    i.e., short lines are only merged for list

  4. changed the title [-]inconsistent behavior of `wrap_comments` (on lists)[/-] [+]inconsistent behavior of `wrap_comments` (merges short lines in lists)[/+] on Jul 17, 2023
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

    A-commentsArea: commentsP-lowLow priorityUO-wrap_commentsUnstable option: wrap_commentsonly-with-optionRequires a non-default option value to reproduce

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions