File tree 4 files changed +11
-5
lines changed
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change
1
+ //~ ERROR Missing code example in this documentation
1
2
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
3
// file at the top-level directory of this distribution and at
3
4
// http://rust-lang.org/COPYRIGHT.
11
12
#![ deny( missing_doc_code_examples) ]
12
13
13
14
/// Some docs.
15
+ //~^ ERROR Missing code example in this documentation
14
16
pub struct Foo ;
15
17
16
18
/// And then, the princess died.
19
+ //~^ ERROR Missing code example in this documentation
17
20
pub mod foo {
18
21
/// Or maybe not because she saved herself!
22
+ //~^ ERROR Missing code example in this documentation
19
23
pub fn bar ( ) { }
20
24
}
Original file line number Diff line number Diff line change 1
1
error: Missing code example in this documentation
2
2
|
3
3
note: lint level defined here
4
- --> $DIR/doc-without-codeblock.rs:11 :9
4
+ --> $DIR/doc-without-codeblock.rs:12 :9
5
5
|
6
6
LL | #![deny(missing_doc_code_examples)]
7
7
| ^^^^^^^^^^^^^^^^^^^^^^^^^
8
8
9
9
error: Missing code example in this documentation
10
- --> $DIR/doc-without-codeblock.rs:13 :1
10
+ --> $DIR/doc-without-codeblock.rs:14 :1
11
11
|
12
12
LL | /// Some docs.
13
13
| ^^^^^^^^^^^^^^
14
14
15
15
error: Missing code example in this documentation
16
- --> $DIR/doc-without-codeblock.rs:16 :1
16
+ --> $DIR/doc-without-codeblock.rs:18 :1
17
17
|
18
18
LL | /// And then, the princess died.
19
19
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
20
21
21
error: Missing code example in this documentation
22
- --> $DIR/doc-without-codeblock.rs:18 :5
22
+ --> $DIR/doc-without-codeblock.rs:21 :5
23
23
|
24
24
LL | /// Or maybe not because she saved herself!
25
25
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 17
17
// https://github.com/rust-lang/rust/issues/55723
18
18
19
19
/// ## For example:
20
- ///
20
+ ///
21
21
/// (arr[i])
22
+ //~^ ERROR `[i]` cannot be resolved, ignoring it...
22
23
pub fn test_ice ( ) {
23
24
unimplemented ! ( ) ;
24
25
}
Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ mod foo {
16
16
/// ```
17
17
/// assert!(false);
18
18
/// ```
19
+ //~^^^^^ ERROR Documentation test in private item
19
20
fn bar ( ) { }
20
21
}
You can’t perform that action at this time.
0 commit comments