This repository was archived by the owner on May 28, 2025. It is now read-only.
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 {
9393 return ;
9494 }
9595
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 ( ) ) ) ;
9999 if !has_doc {
100100 span_lint (
101101 cx,
Original file line number Diff line number Diff line change @@ -67,7 +67,10 @@ impl PubFoo {
6767 pub fn foo ( ) { }
6868 /// dox
6969 pub fn foo1 ( ) { }
70- fn foo2 ( ) { }
70+ #[ must_use = "yep" ]
71+ fn foo2 ( ) -> u32 {
72+ 1
73+ }
7174 #[ allow( clippy:: missing_docs_in_private_items) ]
7275 pub fn foo3 ( ) { }
7376}
Original file line number Diff line number Diff line change @@ -94,10 +94,12 @@ LL | pub fn foo() {}
9494 | ^^^^^^^^^^^^^^^
9595
9696error: missing documentation for an associated function
97- --> $DIR/missing-doc-impl.rs:70 :5
97+ --> $DIR/missing-doc-impl.rs:71 :5
9898 |
99- LL | fn foo2() {}
100- | ^^^^^^^^^^^^
99+ LL | / fn foo2() -> u32 {
100+ LL | | 1
101+ LL | | }
102+ | |_____^
101103
102104error: aborting due to 15 previous errors
103105
You can’t perform that action at this time.
0 commit comments