File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Expand file tree Collapse file tree 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
12// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
23// file at the top-level directory of this distribution and at
34// http://rust-lang.org/COPYRIGHT.
1112#![ deny( missing_doc_code_examples) ]
1213
1314/// Some docs.
15+ //~^ ERROR Missing code example in this documentation
1416pub struct Foo ;
1517
1618/// And then, the princess died.
19+ //~^ ERROR Missing code example in this documentation
1720pub mod foo {
1821 /// Or maybe not because she saved herself!
22+ //~^ ERROR Missing code example in this documentation
1923 pub fn bar ( ) { }
2024}
Original file line number Diff line number Diff line change 11error: Missing code example in this documentation
22 |
33note: lint level defined here
4- --> $DIR/doc-without-codeblock.rs:11 :9
4+ --> $DIR/doc-without-codeblock.rs:12 :9
55 |
66LL | #![deny(missing_doc_code_examples)]
77 | ^^^^^^^^^^^^^^^^^^^^^^^^^
88
99error: Missing code example in this documentation
10- --> $DIR/doc-without-codeblock.rs:13 :1
10+ --> $DIR/doc-without-codeblock.rs:14 :1
1111 |
1212LL | /// Some docs.
1313 | ^^^^^^^^^^^^^^
1414
1515error: Missing code example in this documentation
16- --> $DIR/doc-without-codeblock.rs:16 :1
16+ --> $DIR/doc-without-codeblock.rs:18 :1
1717 |
1818LL | /// And then, the princess died.
1919 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020
2121error: Missing code example in this documentation
22- --> $DIR/doc-without-codeblock.rs:18 :5
22+ --> $DIR/doc-without-codeblock.rs:21 :5
2323 |
2424LL | /// Or maybe not because she saved herself!
2525 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change 1717// https://github.com/rust-lang/rust/issues/55723
1818
1919/// ## For example:
20- ///
20+ ///
2121/// (arr[i])
22+ //~^ ERROR `[i]` cannot be resolved, ignoring it...
2223pub fn test_ice ( ) {
2324 unimplemented ! ( ) ;
2425}
Original file line number Diff line number Diff line change @@ -16,5 +16,6 @@ mod foo {
1616 /// ```
1717 /// assert!(false);
1818 /// ```
19+ //~^^^^^ ERROR Documentation test in private item
1920 fn bar ( ) { }
2021}
You can’t perform that action at this time.
0 commit comments