File tree Expand file tree Collapse file tree 5 files changed +124
-0
lines changed Expand file tree Collapse file tree 5 files changed +124
-0
lines changed Original file line number Diff line number Diff line change
1
+ // compile-flags: -Z unstable-options --check
2
+
3
+ #![ deny( missing_docs) ]
4
+ //~^ ERROR
5
+ //~^^ ERROR
6
+ #![ deny( rustdoc) ]
7
+
8
+ pub fn foo ( ) { }
9
+ //~^ ERROR
10
+ //~^^ ERROR
Original file line number Diff line number Diff line change
1
+ error: missing documentation for the crate
2
+ --> $DIR/check-fail.rs:3:1
3
+ |
4
+ LL | / #![deny(missing_docs)]
5
+ LL | |
6
+ LL | |
7
+ LL | | #![deny(rustdoc)]
8
+ LL | |
9
+ LL | | pub fn foo() {}
10
+ | |_______________^
11
+ |
12
+ note: the lint level is defined here
13
+ --> $DIR/check-fail.rs:3:9
14
+ |
15
+ LL | #![deny(missing_docs)]
16
+ | ^^^^^^^^^^^^
17
+
18
+ error: missing documentation for a function
19
+ --> $DIR/check-fail.rs:8:1
20
+ |
21
+ LL | pub fn foo() {}
22
+ | ^^^^^^^^^^^^
23
+
24
+ error: missing code example in this documentation
25
+ --> $DIR/check-fail.rs:3:1
26
+ |
27
+ LL | / #![deny(missing_docs)]
28
+ LL | |
29
+ LL | |
30
+ LL | | #![deny(rustdoc)]
31
+ LL | |
32
+ LL | | pub fn foo() {}
33
+ | |_______________^
34
+ |
35
+ note: the lint level is defined here
36
+ --> $DIR/check-fail.rs:6:9
37
+ |
38
+ LL | #![deny(rustdoc)]
39
+ | ^^^^^^^
40
+ = note: `#[deny(missing_doc_code_examples)]` implied by `#[deny(rustdoc)]`
41
+
42
+ error: missing code example in this documentation
43
+ --> $DIR/check-fail.rs:8:1
44
+ |
45
+ LL | pub fn foo() {}
46
+ | ^^^^^^^^^^^^^^^
47
+
48
+ error: aborting due to 4 previous errors
49
+
Original file line number Diff line number Diff line change
1
+ // check-pass
2
+ // compile-flags: -Z unstable-options --check
3
+
4
+ #![ warn( missing_docs) ]
5
+ //~^ WARN
6
+ //~^^ WARN
7
+ #![ warn( rustdoc) ]
8
+
9
+ pub fn foo ( ) { }
10
+ //~^ WARN
11
+ //~^^ WARN
Original file line number Diff line number Diff line change
1
+ warning: missing documentation for the crate
2
+ --> $DIR/check.rs:4:1
3
+ |
4
+ LL | / #![warn(missing_docs)]
5
+ LL | |
6
+ LL | |
7
+ LL | | #![warn(rustdoc)]
8
+ LL | |
9
+ LL | | pub fn foo() {}
10
+ | |_______________^
11
+ |
12
+ note: the lint level is defined here
13
+ --> $DIR/check.rs:4:9
14
+ |
15
+ LL | #![warn(missing_docs)]
16
+ | ^^^^^^^^^^^^
17
+
18
+ warning: missing documentation for a function
19
+ --> $DIR/check.rs:9:1
20
+ |
21
+ LL | pub fn foo() {}
22
+ | ^^^^^^^^^^^^
23
+
24
+ warning: missing code example in this documentation
25
+ --> $DIR/check.rs:4:1
26
+ |
27
+ LL | / #![warn(missing_docs)]
28
+ LL | |
29
+ LL | |
30
+ LL | | #![warn(rustdoc)]
31
+ LL | |
32
+ LL | | pub fn foo() {}
33
+ | |_______________^
34
+ |
35
+ note: the lint level is defined here
36
+ --> $DIR/check.rs:7:9
37
+ |
38
+ LL | #![warn(rustdoc)]
39
+ | ^^^^^^^
40
+ = note: `#[warn(missing_doc_code_examples)]` implied by `#[warn(rustdoc)]`
41
+
42
+ warning: missing code example in this documentation
43
+ --> $DIR/check.rs:9:1
44
+ |
45
+ LL | pub fn foo() {}
46
+ | ^^^^^^^^^^^^^^^
47
+
48
+ warning: 4 warnings emitted
49
+
Original file line number Diff line number Diff line change
1
+ // compile-flags: -Z unstable-options --check
2
+
3
+ // @!has check/fn.foo.html
4
+ // @!has check/index.html
5
+ pub fn foo ( ) { }
You can’t perform that action at this time.
0 commit comments