Skip to content

Commit ff97569

Browse files
committed
Update doc-ui tests
1 parent 690439b commit ff97569

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/test/rustdoc-ui/doc-without-codeblock.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
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.
@@ -11,10 +12,13 @@
1112
#![deny(missing_doc_code_examples)]
1213

1314
/// Some docs.
15+
//~^ ERROR Missing code example in this documentation
1416
pub struct Foo;
1517

1618
/// And then, the princess died.
19+
//~^ ERROR Missing code example in this documentation
1720
pub mod foo {
1821
/// Or maybe not because she saved herself!
22+
//~^ ERROR Missing code example in this documentation
1923
pub fn bar() {}
2024
}

src/test/rustdoc-ui/doc-without-codeblock.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
error: Missing code example in this documentation
22
|
33
note: lint level defined here
4-
--> $DIR/doc-without-codeblock.rs:11:9
4+
--> $DIR/doc-without-codeblock.rs:12:9
55
|
66
LL | #![deny(missing_doc_code_examples)]
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^
88

99
error: Missing code example in this documentation
10-
--> $DIR/doc-without-codeblock.rs:13:1
10+
--> $DIR/doc-without-codeblock.rs:14:1
1111
|
1212
LL | /// Some docs.
1313
| ^^^^^^^^^^^^^^
1414

1515
error: Missing code example in this documentation
16-
--> $DIR/doc-without-codeblock.rs:16:1
16+
--> $DIR/doc-without-codeblock.rs:18:1
1717
|
1818
LL | /// And then, the princess died.
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

2121
error: Missing code example in this documentation
22-
--> $DIR/doc-without-codeblock.rs:18:5
22+
--> $DIR/doc-without-codeblock.rs:21:5
2323
|
2424
LL | /// Or maybe not because she saved herself!
2525
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

src/test/rustdoc-ui/intra-link-span-ice-55723.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
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...
2223
pub fn test_ice() {
2324
unimplemented!();
2425
}

src/test/rustdoc-ui/private-item-doc-test.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ mod foo {
1616
/// ```
1717
/// assert!(false);
1818
/// ```
19+
//~^^^^^ ERROR Documentation test in private item
1920
fn bar() {}
2021
}

0 commit comments

Comments
 (0)