Skip to content
Permalink
Browse files

Update rustdoc-ui tests

  • Loading branch information...
GuillaumeGomez committed May 17, 2019
1 parent b5d4bd2 commit c78af2bc60fe8611c063c13bea1295c784403234
@@ -1,6 +1,4 @@
//~ ERROR Missing code example in this documentation

#![deny(missing_doc_code_examples)]
#![deny(missing_doc_code_examples)] //~ ERROR Missing code example in this documentation

/// Some docs.
//~^ ERROR Missing code example in this documentation
@@ -1,25 +1,35 @@
error: Missing code example in this documentation
--> $DIR/doc-without-codeblock.rs:1:1
|
LL | / #![deny(missing_doc_code_examples)]
LL | |
LL | | /// Some docs.
LL | |
... |
LL | | pub fn bar() {}
LL | | }
| |_^
|
note: lint level defined here
--> $DIR/doc-without-codeblock.rs:3:9
--> $DIR/doc-without-codeblock.rs:1:9
|
LL | #![deny(missing_doc_code_examples)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: Missing code example in this documentation
--> $DIR/doc-without-codeblock.rs:5:1
--> $DIR/doc-without-codeblock.rs:3:1
|
LL | /// Some docs.
| ^^^^^^^^^^^^^^

error: Missing code example in this documentation
--> $DIR/doc-without-codeblock.rs:9:1
--> $DIR/doc-without-codeblock.rs:7:1
|
LL | /// And then, the princess died.
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: Missing code example in this documentation
--> $DIR/doc-without-codeblock.rs:12:5
--> $DIR/doc-without-codeblock.rs:10:5
|
LL | /// Or maybe not because she saved herself!
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -16,7 +16,7 @@ fn test() {
}

#[allow(missing_docs)]
mod module1 {
mod module1 { //~ ERROR
}

#[allow(missing_doc_code_examples)]
@@ -35,5 +35,6 @@ mod module2 {
pub mod module3 {

/// doc
//~^ ERROR
pub fn test() {}
}
@@ -0,0 +1,21 @@
error: Missing code example in this documentation
--> $DIR/lint-missing-doc-code-example.rs:19:1
|
LL | / mod module1 {
LL | | }
| |_^
|
note: lint level defined here
--> $DIR/lint-missing-doc-code-example.rs:2:9
|
LL | #![deny(missing_doc_code_examples)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: Missing code example in this documentation
--> $DIR/lint-missing-doc-code-example.rs:37:3
|
LL | /// doc
| ^^^^^^^

error: aborting due to 2 previous errors

0 comments on commit c78af2b

Please sign in to comment.
You can’t perform that action at this time.