@@ -813,8 +813,8 @@ mod foo {
813
813
}
814
814
~~~~~~~~
815
815
816
- When exporting the name of an ` enum ` type ` t ` , by default, the module also
817
- implicitly exports all of ` t ` 's constructors. For example:
816
+ When exporting the name of an ` enum ` type ` t ` , by default, the module does
817
+ * not * implicitly export any of ` t ` 's constructors. For example:
818
818
819
819
~~~~~~~~
820
820
mod foo {
@@ -824,29 +824,7 @@ mod foo {
824
824
}
825
825
~~~~~~~~
826
826
827
- Here, ` foo ` imports ` t ` , ` a ` , ` b ` , and ` c ` .
828
-
829
- The second and third forms of export declaration can be used to export
830
- an ` enum ` item without exporting all of its constructors. These two
831
- forms can only be used to export an ` enum ` item. The second form
832
- exports the ` enum ` type name without exporting any of its
833
- constructors, achieving a simple kind of data abstraction. The third
834
- form exports an ` enum ` type name along with a subset of its
835
- constructors. For example:
836
-
837
- ~~~~~~~~
838
- mod foo {
839
- export abstract::{};
840
- export slightly_abstract::{a, b};
841
-
842
- enum abstract {x, y, z}
843
- enum slightly_abstract {a, b, c, d}
844
- }
845
- ~~~~~~~~
846
-
847
- Module ` foo ` exports the types ` abstract ` and ` slightly_abstract ` , as well as
848
- constructors ` a ` and ` b ` , but doesn't export constructors ` x ` , ` y ` , ` z ` , ` c ` ,
849
- or ` d ` .
827
+ Here, ` foo ` imports ` t ` , but not ` a ` , ` b ` , and ` c ` .
850
828
851
829
### Functions
852
830
0 commit comments