File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change
1
+ // Regression test for <https://github.com/rust-lang/rust/issues/108570>.
2
+ // If a `#[doc(hidden)]` item is re-exported or if a private item is re-exported
3
+ // with a `#[doc(hidden)]` re-export, it shouldn't complain.
4
+
5
+ // check-pass
6
+
7
+ #![ crate_type = "lib" ]
8
+
9
+ mod priv_mod {
10
+ pub struct Foo ;
11
+ #[ doc( hidden) ]
12
+ pub struct Bar ;
13
+ }
14
+
15
+ #[ doc( hidden) ]
16
+ pub use priv_mod:: Foo ;
17
+ pub use priv_mod:: Bar ;
Original file line number Diff line number Diff line change @@ -117,18 +117,36 @@ error: missing documentation for a function
117
117
|
118
118
LL | pub fn undocumented1() {}
119
119
| ^^^^^^^^^^^^^^^^^^^^^^
120
+ |
121
+ note: because it is re-exported here
122
+ --> $DIR/lint-missing-doc.rs:183:5
123
+ |
124
+ LL | pub use internal_impl::undocumented1 as bar;
125
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
126
121
127
error: missing documentation for a function
122
128
--> $DIR/lint-missing-doc.rs:170:5
123
129
|
124
130
LL | pub fn undocumented2() {}
125
131
| ^^^^^^^^^^^^^^^^^^^^^^
132
+ |
133
+ note: because it is re-exported here
134
+ --> $DIR/lint-missing-doc.rs:184:41
135
+ |
136
+ LL | pub use internal_impl::{documented, undocumented2};
137
+ | ^^^^^^^^^^^^^
126
138
127
139
error: missing documentation for a function
128
140
--> $DIR/lint-missing-doc.rs:176:9
129
141
|
130
142
LL | pub fn also_undocumented1() {}
131
143
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
144
+ |
145
+ note: because it is re-exported here
146
+ --> $DIR/lint-missing-doc.rs:185:5
147
+ |
148
+ LL | pub use internal_impl::globbed::*;
149
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132
150
133
151
error: missing documentation for a function
134
152
--> $DIR/lint-missing-doc.rs:191:5
Original file line number Diff line number Diff line change 3
3
//! Use the lint to additionally verify that items are reachable
4
4
//! but not exported.
5
5
#![ allow( non_camel_case_types) ]
6
- #![ deny( missing_docs) ]
6
+ // #![deny(missing_docs)]
7
7
8
8
mod hidden {
9
9
pub struct s ;
You can’t perform that action at this time.
0 commit comments