Skip to content

Commit caa56ef

Browse files
committed
doc_comment_double_space_linebreaks: Fix tests
1 parent 7fe160a commit caa56ef

3 files changed

+31
-23
lines changed

Diff for: tests/ui/doc/doc_comment_double_space_linebreaks.fixed

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#![feature(custom_inner_attributes)]
22
#![rustfmt::skip]
33

4-
#![warn(clippy::doc_comment_double_space_linebreak)]
4+
#![warn(clippy::doc_comment_double_space_linebreaks)]
55
#![allow(unused, clippy::empty_docs)]
66

7+
//~v doc_comment_double_space_linebreaks
78
//! Should warn on double space linebreaks\
89
//! in file/module doc comment
910

@@ -22,16 +23,17 @@ fn single_line_split() {}
2223

2324
#[doc = "This is a doc attribute, which should not be linted"]
2425
fn normal_comment() {
25-
/*
26-
Should not warn on block comments
27-
*/
28-
29-
/*
30-
Should not warn on block comments
31-
with double space at the end of a line
32-
*/
26+
/*
27+
Should not warn on block comments
28+
*/
29+
30+
/*
31+
Should not warn on block comments
32+
with double space at the end of a line
33+
*/
3334
}
3435

36+
//~v doc_comment_double_space_linebreaks
3537
/// Should warn when doc comment uses double space\
3638
/// as a line-break, even when there are multiple\
3739
/// in a row
@@ -41,6 +43,7 @@ fn double_space_doc_comment() {}
4143
/// as a line-break
4244
fn back_slash_doc_comment() {}
4345

46+
//~v doc_comment_double_space_linebreaks
4447
/// 🌹 are 🟥\
4548
/// 🌷 are 🟦\
4649
/// 📎 is 😎\
@@ -83,6 +86,7 @@ fn inline() {}
8386
/// https://example.com) in a URL.
8487
fn url() {}
8588

89+
//~v doc_comment_double_space_linebreaks
8690
/// here we mix\
8791
/// double spaces\
8892
/// and also\

Diff for: tests/ui/doc/doc_comment_double_space_linebreaks.rs

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#![feature(custom_inner_attributes)]
22
#![rustfmt::skip]
33

4-
#![warn(clippy::doc_comment_double_space_linebreak)]
4+
#![warn(clippy::doc_comment_double_space_linebreaks)]
55
#![allow(unused, clippy::empty_docs)]
66

7+
//~v doc_comment_double_space_linebreaks
78
//! Should warn on double space linebreaks
89
//! in file/module doc comment
910
@@ -22,16 +23,17 @@ fn single_line_split() {}
2223

2324
#[doc = "This is a doc attribute, which should not be linted"]
2425
fn normal_comment() {
25-
/*
26-
Should not warn on block comments
27-
*/
28-
29-
/*
30-
Should not warn on block comments
31-
with double space at the end of a line
32-
*/
26+
/*
27+
Should not warn on block comments
28+
*/
29+
30+
/*
31+
Should not warn on block comments
32+
with double space at the end of a line
33+
*/
3334
}
3435

36+
//~v doc_comment_double_space_linebreaks
3537
/// Should warn when doc comment uses double space
3638
/// as a line-break, even when there are multiple
3739
/// in a row
@@ -41,6 +43,7 @@ fn double_space_doc_comment() {}
4143
/// as a line-break
4244
fn back_slash_doc_comment() {}
4345

46+
//~v doc_comment_double_space_linebreaks
4447
/// 🌹 are 🟥
4548
/// 🌷 are 🟦
4649
/// 📎 is 😎
@@ -83,6 +86,7 @@ fn inline() {}
8386
/// https://example.com) in a URL.
8487
fn url() {}
8588

89+
//~v doc_comment_double_space_linebreaks
8690
/// here we mix
8791
/// double spaces\
8892
/// and also

Diff for: tests/ui/doc/doc_comment_double_space_linebreaks.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error: doc comment uses two spaces for a hard line break
2-
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:7:43
2+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:8:43
33
|
44
LL | //! Should warn on double space linebreaks
55
| ^^
66
|
77
= help: replace this double space with a backslash: `\`
8-
= note: `-D clippy::doc-comment-double-space-linebreak` implied by `-D warnings`
8+
= note: `-D clippy::doc-comment-double-space-linebreaks` implied by `-D warnings`
99
= help: to override `-D warnings` add `#[allow(clippy::doc_comment_double_space_linebreaks)]`
1010

1111
error: doc comment uses two spaces for a hard line break
12-
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:35:51
12+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:37:51
1313
|
1414
LL | /// Should warn when doc comment uses double space
1515
| ^^
@@ -19,7 +19,7 @@ LL | /// as a line-break, even when there are multiple
1919
= help: replace this double space with a backslash: `\`
2020

2121
error: doc comment uses two spaces for a hard line break
22-
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:44:12
22+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:47:12
2323
|
2424
LL | /// 🌹 are 🟥
2525
| ^^
@@ -33,7 +33,7 @@ LL | /// and so are 🫵
3333
= help: replace this double space with a backslash: `\`
3434

3535
error: doc comment uses two spaces for a hard line break
36-
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:86:16
36+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:90:16
3737
|
3838
LL | /// here we mix
3939
| ^^

0 commit comments

Comments
 (0)