Skip to content

Commit

Permalink
Associated items and variants inherit visibility from their traits an…
Browse files Browse the repository at this point in the history
…d enums respectively.
  • Loading branch information
liigo committed Dec 13, 2016
1 parent 8323185 commit e095c71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ 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 two exceptions: Associated
items of a Trait are public by default; Enum variants
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:

Expand Down

0 comments on commit e095c71

Please sign in to comment.