Skip to content

Commit 4519980

Browse files
committed
uibless
1 parent 7babc2a commit 4519980

File tree

2 files changed

+37
-7
lines changed

2 files changed

+37
-7
lines changed

tests/ui/doc/doc_comment_double_space_linebreak.fixed

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,12 @@ fn inline() {}
8383
/// https://example.com) in a URL.
8484
fn url() {}
8585

86+
/// here we mix\
87+
/// double spaces\
88+
/// and also\
89+
/// adding backslash\
90+
/// to some of them\
91+
/// to see how that looks
92+
fn mixed() {}
93+
8694
fn main() {}
Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: doc comments should use a back-slash (\) instead of a double space to indicate a linebreak
1+
error: doc comment uses two spaces for a hard line break
22
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:7:43
33
|
44
LL | //! Should warn on double space linebreaks
@@ -8,13 +8,13 @@ LL | | //! in file/module doc comment
88
|
99
= note: `-D clippy::doc-comment-double-space-linebreak` implied by `-D warnings`
1010
= help: to override `-D warnings` add `#[allow(clippy::doc_comment_double_space_linebreak)]`
11-
help: replace this double space with a back-slash
11+
help: replace this double space with a backslash
1212
|
1313
LL ~ //! Should warn on double space linebreaks\
1414
LL ~ //! in file/module doc comment
1515
|
1616

17-
error: doc comments should use a back-slash (\) instead of a double space to indicate a linebreak
17+
error: doc comment uses two spaces for a hard line break
1818
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:35:51
1919
|
2020
LL | /// Should warn when doc comment uses double space
@@ -23,14 +23,14 @@ LL | | /// as a line-break, even when there are multiple
2323
LL | | /// in a row
2424
| |____^
2525
|
26-
help: replace this double space with a back-slash
26+
help: replace this double space with a backslash
2727
|
2828
LL ~ /// Should warn when doc comment uses double space\
2929
LL ~ /// as a line-break, even when there are multiple\
3030
LL ~ /// in a row
3131
|
3232

33-
error: doc comments should use a back-slash (\) instead of a double space to indicate a linebreak
33+
error: doc comment uses two spaces for a hard line break
3434
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:44:12
3535
|
3636
LL | /// 🌹 are 🟥
@@ -41,7 +41,7 @@ LL | | /// and so are 🫵
4141
LL | | /// (hopefully no formatting weirdness linting this)
4242
| |____^
4343
|
44-
help: replace this double space with a back-slash
44+
help: replace this double space with a backslash
4545
|
4646
LL ~ /// 🌹 are 🟥\
4747
LL ~ /// 🌷 are 🟦\
@@ -50,5 +50,27 @@ LL ~ /// and so are 🫵\
5050
LL ~ /// (hopefully no formatting weirdness linting this)
5151
|
5252

53-
error: aborting due to 3 previous errors
53+
error: doc comment uses two spaces for a hard line break
54+
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:86:16
55+
|
56+
LL | /// here we mix
57+
| ________________^
58+
LL | | /// double spaces\
59+
LL | | /// and also
60+
LL | | /// adding backslash\
61+
LL | | /// to some of them
62+
LL | | /// to see how that looks
63+
| |____^
64+
|
65+
help: replace this double space with a backslash
66+
|
67+
LL ~ /// here we mix\
68+
LL ~ /// double spaces\
69+
LL ~ /// and also\
70+
LL ~ /// adding backslash\
71+
LL ~ /// to some of them\
72+
LL ~ /// to see how that looks
73+
|
74+
75+
error: aborting due to 4 previous errors
5476

0 commit comments

Comments
 (0)