Skip to content

Commit 3791cdf

Browse files
authored
Merge pull request #90 from brauliobz/grammar_visibility
Added visibility grammar
2 parents c9f0119 + d6e30ca commit 3791cdf

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)