diff --git a/tests/source/configs/comment_width/5801.rs b/tests/source/configs/comment_width/5801.rs new file mode 100644 index 00000000000..b448b273005 --- /dev/null +++ b/tests/source/configs/comment_width/5801.rs @@ -0,0 +1,16 @@ +// rustfmt-comment_width: 120 +// rustfmt-wrap_comments: true +// rustfmt-unstable_features: true +// rustfmt-max_width: 120 + +/// This function is 120 columns wide and is left alone. This comment is 120 columns wide and the formatter is also fine +fn my_super_cool_function_name(my_very_cool_argument_name: String, my_other_very_cool_argument_name: String) -> String { + unimplemented!() +} + +pub enum Severity { + /// But here, this comment is 120 columns wide and the formatter wants to split it up onto two separate lines still. + Error, + /// This comment is 119 columns wide and works perfectly. Lorem ipsum. lorem ipsum. lorem ipsum. lorem ipsum lorem. + Warning, +} \ No newline at end of file diff --git a/tests/target/configs/comment_width/5801.rs b/tests/target/configs/comment_width/5801.rs new file mode 100644 index 00000000000..b1b01240fc6 --- /dev/null +++ b/tests/target/configs/comment_width/5801.rs @@ -0,0 +1,16 @@ +// rustfmt-comment_width: 120 +// rustfmt-wrap_comments: true +// rustfmt-unstable_features: true +// rustfmt-max_width: 120 + +/// This function is 120 columns wide and is left alone. This comment is 120 columns wide and the formatter is also fine +fn my_super_cool_function_name(my_very_cool_argument_name: String, my_other_very_cool_argument_name: String) -> String { + unimplemented!() +} + +pub enum Severity { + /// But here, this comment is 120 columns wide and the formatter wants to split it up onto two separate lines still. + Error, + /// This comment is 119 columns wide and works perfectly. Lorem ipsum. lorem ipsum. lorem ipsum. lorem ipsum lorem. + Warning, +}