-
Notifications
You must be signed in to change notification settings - Fork 986
Closed
Labels
I-max-widthIssue: formatting exceeds maximum widthIssue: formatting exceeds maximum widthI-poor-formattingIssue: poor formattingIssue: poor formatting
Description
Consider the following function:
fn my_function(
my_long_impl_trait_parameter: impl Into<MyVeryLongTypeNameThatMakesThisWholeLineOverThe100CharLimit>,
) {
}The parameter line is too long (105 chars) but rustfmt does not change it, it even reformats to this if we try to fix it manually.
Interestingly, if we add one more character then it breaks correctly:
fn my_function(
my_long_impl_trait_parameter: impl Into<
MyVeryLongTypeNameThatMakesThisWholeLineOverThe100CharLimitA,
>,
) {
}(I have chosen the example in the extreme case on purpose)
Also if we remove the impl and replace Into with some struct name it correctly formats again. So I think it has to do with the impl , but this is just a wild guess.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
I-max-widthIssue: formatting exceeds maximum widthIssue: formatting exceeds maximum widthI-poor-formattingIssue: poor formattingIssue: poor formatting