Skip to content

Commit

Permalink
uibless
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacherr committed Sep 3, 2024
1 parent 7babc2a commit 4519980
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
8 changes: 8 additions & 0 deletions tests/ui/doc/doc_comment_double_space_linebreak.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,12 @@ fn inline() {}
/// https://example.com) in a URL.
fn url() {}

/// here we mix\
/// double spaces\
/// and also\
/// adding backslash\
/// to some of them\
/// to see how that looks
fn mixed() {}

fn main() {}
36 changes: 29 additions & 7 deletions tests/ui/doc/doc_comment_double_space_linebreak.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: doc comments should use a back-slash (\) instead of a double space to indicate a linebreak
error: doc comment uses two spaces for a hard line break
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:7:43
|
LL | //! Should warn on double space linebreaks
Expand All @@ -8,13 +8,13 @@ LL | | //! in file/module doc comment
|
= note: `-D clippy::doc-comment-double-space-linebreak` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_comment_double_space_linebreak)]`
help: replace this double space with a back-slash
help: replace this double space with a backslash
|
LL ~ //! Should warn on double space linebreaks\
LL ~ //! in file/module doc comment
|

error: doc comments should use a back-slash (\) instead of a double space to indicate a linebreak
error: doc comment uses two spaces for a hard line break
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:35:51
|
LL | /// Should warn when doc comment uses double space
Expand All @@ -23,14 +23,14 @@ LL | | /// as a line-break, even when there are multiple
LL | | /// in a row
| |____^
|
help: replace this double space with a back-slash
help: replace this double space with a backslash
|
LL ~ /// Should warn when doc comment uses double space\
LL ~ /// as a line-break, even when there are multiple\
LL ~ /// in a row
|

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

error: aborting due to 3 previous errors
error: doc comment uses two spaces for a hard line break
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:86:16
|
LL | /// here we mix
| ________________^
LL | | /// double spaces\
LL | | /// and also
LL | | /// adding backslash\
LL | | /// to some of them
LL | | /// to see how that looks
| |____^
|
help: replace this double space with a backslash
|
LL ~ /// here we mix\
LL ~ /// double spaces\
LL ~ /// and also\
LL ~ /// adding backslash\
LL ~ /// to some of them\
LL ~ /// to see how that looks
|

error: aborting due to 4 previous errors

0 comments on commit 4519980

Please sign in to comment.