blob: 407cafa01903fef9334a91eb2df45ada4138c8da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
### What it does
Restricts the usage of `pub use ...`
### Why is this bad?
`pub use` is usually fine, but a project may wish to limit `pub use` instances to prevent
unintentional exports or to encourage placing exported items directly in public modules
### Example
```
pub mod outer {
mod inner {
pub struct Test {}
}
pub use inner::Test;
}
use outer::Test;
```
Use instead:
```
pub mod outer {
pub struct Test {}
}
use outer::Test;
```
|