Skip to content

Commit 4d0da5e

Browse files
committed
Fix tests
1 parent c073668 commit 4d0da5e

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

tests/rustdoc-ui/lints/check.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//@ check-pass
22
//@ compile-flags: -Z unstable-options --check
33
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
4-
5-
#![feature(rustdoc_missing_doc_code_examples)]
4+
#![feature(rustdoc_missing_doc_code_examples)] //~ WARN no documentation found for `check`'s top-level module
65
//~^ WARN
76

87
#![warn(missing_docs)]
@@ -12,5 +11,3 @@
1211
pub fn foo() {}
1312
//~^ WARN
1413
//~^^ WARN
15-
16-
//~? WARN no documentation found for this crate's top-level module

tests/rustdoc-ui/lints/check.stderr

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: missing documentation for the crate
2-
--> $DIR/check.rs:5:1
2+
--> $DIR/check.rs:4:1
33
|
44
LL | / #![feature(rustdoc_missing_doc_code_examples)]
55
LL | |
@@ -10,36 +10,45 @@ LL | | pub fn foo() {}
1010
| |_______________^
1111
|
1212
note: the lint level is defined here
13-
--> $DIR/check.rs:8:9
13+
--> $DIR/check.rs:7:9
1414
|
1515
LL | #![warn(missing_docs)]
1616
| ^^^^^^^^^^^^
1717

1818
warning: missing documentation for a function
19-
--> $DIR/check.rs:12:1
19+
--> $DIR/check.rs:11:1
2020
|
2121
LL | pub fn foo() {}
2222
| ^^^^^^^^^^^^
2323

24-
warning: no documentation found for this crate's top-level module
24+
warning: no documentation found for `check`'s top-level module
25+
--> $DIR/check.rs:4:1
26+
|
27+
LL | / #![feature(rustdoc_missing_doc_code_examples)]
28+
LL | |
29+
LL | |
30+
LL | | #![warn(missing_docs)]
31+
... |
32+
LL | | pub fn foo() {}
33+
| |_______________^
2534
|
2635
= help: The following guide may be of use:
2736
https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
2837
note: the lint level is defined here
29-
--> $DIR/check.rs:10:9
38+
--> $DIR/check.rs:9:9
3039
|
3140
LL | #![warn(rustdoc::all)]
3241
| ^^^^^^^^^^^^
3342
= note: `#[warn(rustdoc::missing_crate_level_docs)]` implied by `#[warn(rustdoc::all)]`
3443

3544
warning: missing code example in this documentation
36-
--> $DIR/check.rs:12:1
45+
--> $DIR/check.rs:11:1
3746
|
3847
LL | pub fn foo() {}
3948
| ^^^^^^^^^^^^^^^
4049
|
4150
note: the lint level is defined here
42-
--> $DIR/check.rs:9:9
51+
--> $DIR/check.rs:8:9
4352
|
4453
LL | #![warn(rustdoc::missing_doc_code_examples)]
4554
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
2-
#![deny(rustdoc::missing_crate_level_docs)]
2+
#![deny(rustdoc::missing_crate_level_docs)] //~ ERROR no documentation found for `no_crate_level_doc_lint`'s top-level module
33
//^~ NOTE defined here
44

55
pub fn foo() {}
6-
7-
//~? ERROR no documentation found for this crate's top-level module

tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
error: no documentation found for this crate's top-level module
1+
error: no documentation found for `no_crate_level_doc_lint`'s top-level module
2+
--> $DIR/no-crate-level-doc-lint.rs:2:1
3+
|
4+
LL | / #![deny(rustdoc::missing_crate_level_docs)]
5+
... |
6+
LL | | pub fn foo() {}
7+
| |_______________^
28
|
39
= help: The following guide may be of use:
410
https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html

0 commit comments

Comments
 (0)