diff options
| author | Liigo Zhuang <liigo@qq.com> | 2016-12-07 16:37:38 +0800 |
|---|---|---|
| committer | Liigo <liigo@qq.com> | 2016-12-13 20:22:33 +0800 |
| commit | 83231859417efc363d6929b58d75cdcf40bb5f2d (patch) | |
| tree | c6a29708f3d93266f1372ac0f9ff2c893f2e7169 /src | |
| parent | b1a2ab86dbd73b3bae979d4472b04ae3655f6b21 (diff) | |
| download | rust-83231859417efc363d6929b58d75cdcf40bb5f2d.tar.gz rust-83231859417efc363d6929b58d75cdcf40bb5f2d.zip | |
minor fix about visibility in reference
Diffstat (limited to 'src')
| -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..ce3fef982b9 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 of a 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: |
