Skip to content

Commit 24487b1

Browse files
GuillaumeGomezjdonszelmann
authored andcommitted
Update UI tests
1 parent 1ffea95 commit 24487b1

File tree

6 files changed

+27
-25
lines changed

6 files changed

+27
-25
lines changed

src/tools/clippy/clippy_lints/src/empty_line_after.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct Stop {
133133
impl Stop {
134134
fn convert_to_inner(&self) -> (Span, String) {
135135
let inner = match self.kind {
136-
// #|[...]
136+
// #![...]
137137
StopKind::Attr => InnerSpan::new(1, 1),
138138
// /// or /**
139139
// ^ ^

src/tools/clippy/tests/ui/empty_line_after/doc_comments.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | / /// for the crate
55
LL | |
66
| |_^
77
LL | fn first_in_crate() {}
8-
| ------------------- the comment documents this function
8+
| ----------------- the comment documents this function
99
|
1010
= note: `-D clippy::empty-line-after-doc-comments` implied by `-D warnings`
1111
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_doc_comments)]`
@@ -24,7 +24,7 @@ LL | / /// for the module
2424
LL | |
2525
| |_^
2626
LL | fn first_in_module() {}
27-
| -------------------- the comment documents this function
27+
| ------------------ the comment documents this function
2828
|
2929
= help: if the empty line is unintentional remove it
3030
help: if the comment should document the parent module use an inner doc comment
@@ -42,7 +42,7 @@ LL | |
4242
| |_^
4343
LL | /// Blank line
4444
LL | fn indented() {}
45-
| ------------- the comment documents this function
45+
| ----------- the comment documents this function
4646
|
4747
= help: if the empty line is unintentional remove it
4848
help: if the documentation should include the empty line include it in the comment
@@ -57,7 +57,7 @@ LL | / /// This should produce a warning
5757
LL | |
5858
| |_^
5959
LL | fn with_doc_and_newline() {}
60-
| ------------------------- the comment documents this function
60+
| ----------------------- the comment documents this function
6161
|
6262
= help: if the empty line is unintentional remove it
6363

@@ -72,7 +72,7 @@ LL | |
7272
| |_^
7373
...
7474
LL | fn three_attributes() {}
75-
| --------------------- the comment documents this function
75+
| ------------------- the comment documents this function
7676
|
7777
= help: if the empty lines are unintentional remove them
7878

@@ -84,7 +84,7 @@ LL | | // fn old_code() {}
8484
LL | |
8585
| |_^
8686
LL | fn new_code() {}
87-
| ------------- the comment documents this function
87+
| ----------- the comment documents this function
8888
|
8989
= help: if the empty line is unintentional remove it
9090
help: if the doc comment should not document `new_code` comment it out
@@ -126,7 +126,7 @@ LL | | */
126126
LL | |
127127
| |_^
128128
LL | fn first_in_module() {}
129-
| -------------------- the comment documents this function
129+
| ------------------ the comment documents this function
130130
|
131131
= help: if the empty line is unintentional remove it
132132
help: if the comment should document the parent module use an inner doc comment
@@ -145,7 +145,7 @@ LL | |
145145
| |_^
146146
...
147147
LL | fn new_code() {}
148-
| ------------- the comment documents this function
148+
| ----------- the comment documents this function
149149
|
150150
= help: if the empty line is unintentional remove it
151151
help: if the doc comment should not document `new_code` comment it out
@@ -163,7 +163,7 @@ LL | |
163163
| |_^
164164
LL | /// Docs for `new_code2`
165165
LL | fn new_code2() {}
166-
| -------------- the comment documents this function
166+
| ------------ the comment documents this function
167167
|
168168
= help: if the empty line is unintentional remove it
169169
help: if the doc comment should not document `new_code2` comment it out

src/tools/clippy/tests/ui/empty_line_after/outer_attribute.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | / #[crate_type = "lib"]
55
LL | |
66
| |_^
77
LL | fn first_in_crate() {}
8-
| ------------------- the attribute applies to this function
8+
| ----------------- the attribute applies to this function
99
|
1010
= note: `-D clippy::empty-line-after-outer-attr` implied by `-D warnings`
1111
= help: to override `-D warnings` add `#[allow(clippy::empty_line_after_outer_attr)]`
@@ -23,7 +23,7 @@ LL | |
2323
| |_^
2424
LL | /// some comment
2525
LL | fn with_one_newline_and_comment() {}
26-
| --------------------------------- the attribute applies to this function
26+
| ------------------------------- the attribute applies to this function
2727
|
2828
= help: if the empty line is unintentional remove it
2929

@@ -34,7 +34,7 @@ LL | / #[inline]
3434
LL | |
3535
| |_^
3636
LL | fn with_one_newline() {}
37-
| --------------------- the attribute applies to this function
37+
| ------------------- the attribute applies to this function
3838
|
3939
= help: if the empty line is unintentional remove it
4040

@@ -46,7 +46,7 @@ LL | |
4646
LL | |
4747
| |_^
4848
LL | fn with_two_newlines() {}
49-
| ---------------------- the attribute applies to this function
49+
| -------------------- the attribute applies to this function
5050
|
5151
= help: if the empty lines are unintentional remove them
5252
help: if the attribute should apply to the parent module use an inner attribute
@@ -95,7 +95,7 @@ LL | | // Still lint cases where the empty line does not immediately follow the
9595
LL | |
9696
| |_^
9797
LL | fn comment_before_empty_line() {}
98-
| ------------------------------ the attribute applies to this function
98+
| ---------------------------- the attribute applies to this function
9999
|
100100
= help: if the empty line is unintentional remove it
101101

@@ -107,7 +107,7 @@ LL | / #[allow(unused)]
107107
LL | |
108108
| |_^
109109
LL | pub fn isolated_comment() {}
110-
| ------------------------- the attribute applies to this function
110+
| ----------------------- the attribute applies to this function
111111
|
112112
= help: if the empty lines are unintentional remove them
113113

src/tools/clippy/tests/ui/suspicious_doc_comments.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(unused)]
22
#![warn(clippy::suspicious_doc_comments)]
3+
#![allow(clippy::empty_line_after_doc_comments)]
34

45
//! Real module documentation.
56
//! Fake module documentation.

src/tools/clippy/tests/ui/suspicious_doc_comments.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![allow(unused)]
22
#![warn(clippy::suspicious_doc_comments)]
3+
#![allow(clippy::empty_line_after_doc_comments)]
34

45
//! Real module documentation.
56
///! Fake module documentation.

src/tools/clippy/tests/ui/suspicious_doc_comments.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this is an outer doc comment and does not apply to the parent module or crate
2-
--> tests/ui/suspicious_doc_comments.rs:5:1
2+
--> tests/ui/suspicious_doc_comments.rs:6:1
33
|
44
LL | ///! Fake module documentation.
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -12,7 +12,7 @@ LL | //! Fake module documentation.
1212
|
1313

1414
error: this is an outer doc comment and does not apply to the parent module or crate
15-
--> tests/ui/suspicious_doc_comments.rs:9:5
15+
--> tests/ui/suspicious_doc_comments.rs:10:5
1616
|
1717
LL | ///! This module contains useful functions.
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | //! This module contains useful functions.
2323
|
2424

2525
error: this is an outer doc comment and does not apply to the parent module or crate
26-
--> tests/ui/suspicious_doc_comments.rs:21:5
26+
--> tests/ui/suspicious_doc_comments.rs:22:5
2727
|
2828
LL | / /**! This module contains useful functions.
2929
LL | | */
@@ -36,7 +36,7 @@ LL + */
3636
|
3737

3838
error: this is an outer doc comment and does not apply to the parent module or crate
39-
--> tests/ui/suspicious_doc_comments.rs:35:5
39+
--> tests/ui/suspicious_doc_comments.rs:36:5
4040
|
4141
LL | / ///! This module
4242
LL | | ///! contains
@@ -51,7 +51,7 @@ LL ~ //! useful functions.
5151
|
5252

5353
error: this is an outer doc comment and does not apply to the parent module or crate
54-
--> tests/ui/suspicious_doc_comments.rs:43:5
54+
--> tests/ui/suspicious_doc_comments.rs:44:5
5555
|
5656
LL | / ///! a
5757
LL | | ///! b
@@ -64,7 +64,7 @@ LL ~ //! b
6464
|
6565

6666
error: this is an outer doc comment and does not apply to the parent module or crate
67-
--> tests/ui/suspicious_doc_comments.rs:51:5
67+
--> tests/ui/suspicious_doc_comments.rs:52:5
6868
|
6969
LL | ///! a
7070
| ^^^^^^
@@ -75,7 +75,7 @@ LL | //! a
7575
|
7676

7777
error: this is an outer doc comment and does not apply to the parent module or crate
78-
--> tests/ui/suspicious_doc_comments.rs:57:5
78+
--> tests/ui/suspicious_doc_comments.rs:58:5
7979
|
8080
LL | / ///! a
8181
LL | |
@@ -90,7 +90,7 @@ LL ~ //! b
9090
|
9191

9292
error: this is an outer doc comment and does not apply to the parent module or crate
93-
--> tests/ui/suspicious_doc_comments.rs:69:5
93+
--> tests/ui/suspicious_doc_comments.rs:70:5
9494
|
9595
LL | ///! Very cool macro
9696
| ^^^^^^^^^^^^^^^^^^^^
@@ -101,7 +101,7 @@ LL | //! Very cool macro
101101
|
102102

103103
error: this is an outer doc comment and does not apply to the parent module or crate
104-
--> tests/ui/suspicious_doc_comments.rs:76:5
104+
--> tests/ui/suspicious_doc_comments.rs:77:5
105105
|
106106
LL | ///! Huh.
107107
| ^^^^^^^^^

0 commit comments

Comments
 (0)