File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -93,9 +93,9 @@ impl MissingDoc {
93
93
return ;
94
94
}
95
95
96
- let has_doc = attrs. iter ( ) . any ( |a| {
97
- a . is_doc_comment ( ) || a . doc_str ( ) . is_some ( ) || a . value_str ( ) . is_some ( ) || Self :: has_include ( a . meta ( ) )
98
- } ) ;
96
+ let has_doc = attrs
97
+ . iter ( )
98
+ . any ( |a| a . doc_str ( ) . is_some ( ) || Self :: has_include ( a . meta ( ) ) ) ;
99
99
if !has_doc {
100
100
span_lint (
101
101
cx,
Original file line number Diff line number Diff line change @@ -67,7 +67,10 @@ impl PubFoo {
67
67
pub fn foo ( ) { }
68
68
/// dox
69
69
pub fn foo1 ( ) { }
70
- fn foo2 ( ) { }
70
+ #[ must_use = "yep" ]
71
+ fn foo2 ( ) -> u32 {
72
+ 1
73
+ }
71
74
#[ allow( clippy:: missing_docs_in_private_items) ]
72
75
pub fn foo3 ( ) { }
73
76
}
Original file line number Diff line number Diff line change @@ -94,10 +94,12 @@ LL | pub fn foo() {}
94
94
| ^^^^^^^^^^^^^^^
95
95
96
96
error: missing documentation for an associated function
97
- --> $DIR/missing-doc-impl.rs:70 :5
97
+ --> $DIR/missing-doc-impl.rs:71 :5
98
98
|
99
- LL | fn foo2() {}
100
- | ^^^^^^^^^^^^
99
+ LL | / fn foo2() -> u32 {
100
+ LL | | 1
101
+ LL | | }
102
+ | |_____^
101
103
102
104
error: aborting due to 15 previous errors
103
105
You can’t perform that action at this time.
0 commit comments