blob: 4684b0cd7e24a5c8486b95052ab5fe9485f39f0b [file] [log] [blame] [view] [edit]
Modules can be mapped to a file/directory hierarchy. Let's break down the
[visibility example](/mod/visibility.html) in files:
```
$ tree .
.
|-- my
| |-- inaccessible.rs
| |-- mod.rs
| `-- nested.rs
`-- split.rs
```
{split.rs}
{my/mod.rs}
{my/nested.rs}
{my/inaccessible.rs}
Let's check that things still work as before:
```
$ rustc split.rs && ./split
called `my::function()`
called `function()`
called `my::indirect_access()`, that
> called `my::private_function()`
called `my::nested::function()`
```