Skip to content

Commit e23f8b0

Browse files
committed
Fix examples that use missing_docs lint
The missing_docs lint only applies to public items in public modules, so this example code did not actually generate any warnings or errors.
1 parent 5d6e8fc commit e23f8b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/doc/reference.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ along with their default settings. [Compiler
20952095
plugins](book/compiler-plugins.html#lint-plugins) can provide additional lint checks.
20962096

20972097
```{.ignore}
2098-
mod m1 {
2098+
pub mod m1 {
20992099
// Missing documentation is ignored here
21002100
#[allow(missing_docs)]
21012101
pub fn undocumented_one() -> i32 { 1 }
@@ -2115,9 +2115,9 @@ check on and off:
21152115

21162116
```{.ignore}
21172117
#[warn(missing_docs)]
2118-
mod m2{
2118+
pub mod m2{
21192119
#[allow(missing_docs)]
2120-
mod nested {
2120+
pub mod nested {
21212121
// Missing documentation is ignored here
21222122
pub fn undocumented_one() -> i32 { 1 }
21232123
@@ -2137,7 +2137,7 @@ that lint check:
21372137

21382138
```{.ignore}
21392139
#[forbid(missing_docs)]
2140-
mod m3 {
2140+
pub mod m3 {
21412141
// Attempting to toggle warning signals an error here
21422142
#[allow(missing_docs)]
21432143
/// Returns 2.

0 commit comments

Comments
 (0)