Skip to content

Commit d6e30ca

Browse files
committed
Added visibility' grammar
1 parent 2c29398 commit d6e30ca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/visibility-and-privacy.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Visibility and Privacy
22

3+
> **<sup>Syntax<sup>**
4+
> _Visibility_ :
5+
> &nbsp;&nbsp; &nbsp;&nbsp; EMPTY
6+
> &nbsp;&nbsp; | `pub`
7+
> &nbsp;&nbsp; | `pub` `(` `crate` `)`
8+
> &nbsp;&nbsp; | `pub` `(` `in` _ModulePath_ `)`
9+
> &nbsp;&nbsp; | `pub` `(` `in`<sup>?</sup> `self` `)`
10+
> &nbsp;&nbsp; | `pub` `(` `in`<sup>?</sup> `super` `)`
11+
312
These two terms are often used interchangeably, and what they are attempting to
413
convey is the answer to the question "Can this item be used at this location?"
514

0 commit comments

Comments
 (0)