diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-12-20 11:16:25 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-20 11:16:25 -0800 |
| commit | 70e1275a1affc599e335cd6eee2d84dd594a1f9e (patch) | |
| tree | 24ed2bec4e5425a57a575adbaa758fa978a1efa3 /src/doc | |
| parent | b070feb4408ab8cfb5153594bdaad482ee7905a4 (diff) | |
| parent | e095c710f73ae98cdc769a3e7992d3a44e91bb8f (diff) | |
| download | rust-70e1275a1affc599e335cd6eee2d84dd594a1f9e.tar.gz rust-70e1275a1affc599e335cd6eee2d84dd594a1f9e.zip | |
Rollup merge of #38215 - liigo:patch-12, r=petrochenkov
minor fix about visibility in reference
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/reference.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/doc/reference.md b/src/doc/reference.md index bf286aaec4b..b5a91a170d8 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1731,7 +1731,8 @@ of an item to see whether it should be allowed or not. This is where privacy warnings are generated, or otherwise "you used a private item of another module and weren't allowed to." -By default, everything in Rust is *private*, with one exception. Enum variants +By default, everything in Rust is *private*, with two exceptions: Associated +items in a `pub` Trait are public by default; Enum variants in a `pub` enum are also public by default. When an item is declared as `pub`, it can be thought of as being accessible to the outside world. For example: |
