File tree Expand file tree Collapse file tree 2 files changed +15
-16
lines changed Expand file tree Collapse file tree 2 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ version = "0.0.0"
7
7
edition = " 2018"
8
8
publish = false
9
9
10
+ [lib ]
11
+ name = " crate" # This crate itself is not intended to be used directly.
12
+
10
13
[dependencies ]
11
14
verification-helper-rust-example-hello = { path = " crates/helloworld/hello" }
12
15
verification-helper-rust-example-input = { path = " crates/io/input" }
Original file line number Diff line number Diff line change 1
1
//! Re-exports the crates for rustdoc.
2
+ //!
3
+ //! This crate itself is not intended to be used directly.
4
+
5
+ // With `custom-build` and `syn` crate, we can expand crate-level rustdocs.
6
+
7
+ macro_rules! re_export( ( $( $name: ident) ,* $( , ) ?) => ( $( pub mod $name { pub use :: $name:: * ; } ) * ) ) ;
8
+
2
9
pub mod helloworld {
3
10
//! Crates of "hello" and "world".
4
- pub mod hello {
5
- //! A re-export of `verification-helper-rust-example-hello`.
6
- pub use hello:: * ;
7
- }
8
- pub mod world {
9
- //! A re-export of `verification-helper-rust-example-world`.
10
- pub use world:: * ;
11
- }
11
+
12
+ re_export ! ( hello, world) ;
12
13
}
14
+
13
15
pub mod io {
14
16
//! Crates about IO.
15
- pub mod input {
16
- //! A re-export of `verification-helper-rust-example-input`.
17
- pub use input:: * ;
18
- }
19
- pub mod scanner {
20
- //! A re-export of `verification-helper-rust-example-scanner`.
21
- pub use scanner:: * ;
22
- }
17
+
18
+ re_export ! ( input, scanner) ;
23
19
}
You can’t perform that action at this time.
0 commit comments