File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
1
use clippy_utils:: diagnostics:: span_lint_and_help;
2
2
use rustc_ast:: ast:: * ;
3
3
use rustc_lint:: { EarlyContext , EarlyLintPass } ;
4
- use rustc_session:: { declare_lint_pass, declare_tool_lint } ;
4
+ use rustc_session:: declare_lint_pass;
5
5
6
6
declare_clippy_lint ! {
7
7
/// ### What it does
@@ -35,6 +35,7 @@ fn trim_comment(comment: &str) -> String {
35
35
. trim ( )
36
36
. split ( "\n " )
37
37
. map ( |comment| comment. trim ( ) . trim_matches ( '*' ) . trim_matches ( '!' ) )
38
+ . filter ( |line| !line. is_empty ( ) )
38
39
. collect :: < Vec < & str > > ( )
39
40
. join ( "" )
40
41
}
Original file line number Diff line number Diff line change 1
1
error: empty doc comment
2
- --> $DIR /empty_docs.rs:11:5
2
+ --> tests/ui /empty_docs.rs:11:5
3
3
|
4
4
LL | ///
5
5
| ^^^
@@ -9,15 +9,15 @@ LL | ///
9
9
= help: to override `-D warnings` add `#[allow(clippy::empty_docs)]`
10
10
11
11
error: empty doc comment
12
- --> $DIR /empty_docs.rs:13:5
12
+ --> tests/ui /empty_docs.rs:13:5
13
13
|
14
14
LL | ///
15
15
| ^^^
16
16
|
17
17
= help: consider removing or fill it
18
18
19
19
error: empty doc comment
20
- --> $DIR /empty_docs.rs:16:5
20
+ --> tests/ui /empty_docs.rs:16:5
21
21
|
22
22
LL | / /**
23
23
LL | | *
@@ -27,15 +27,15 @@ LL | | */
27
27
= help: consider removing or fill it
28
28
29
29
error: empty doc comment
30
- --> $DIR /empty_docs.rs:6:5
30
+ --> tests/ui /empty_docs.rs:6:5
31
31
|
32
32
LL | //!
33
33
| ^^^
34
34
|
35
35
= help: consider removing or fill it
36
36
37
37
error: empty doc comment
38
- --> $DIR /empty_docs.rs:8:5
38
+ --> tests/ui /empty_docs.rs:8:5
39
39
|
40
40
LL | //!!
41
41
| ^^^^
You can’t perform that action at this time.
0 commit comments