Skip to content

Commit 61f4aaa

Browse files
committed
doc: Remove the section on the enum exporting feature
1 parent baebccd commit 61f4aaa

File tree

1 file changed

+3
-25
lines changed

1 file changed

+3
-25
lines changed

doc/rust.md

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -813,8 +813,8 @@ mod foo {
813813
}
814814
~~~~~~~~
815815

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:
818818

819819
~~~~~~~~
820820
mod foo {
@@ -824,29 +824,7 @@ mod foo {
824824
}
825825
~~~~~~~~
826826

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`.
850828

851829
### Functions
852830

0 commit comments

Comments
 (0)