about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-06-09 06:49:41 +0200
committerMazdak Farrokhzad <twingoow@gmail.com>2019-06-15 19:18:09 +0200
commit46f405ec4d7c6bf16fc2eaafe7541019f1da2996 (patch)
tree7dcc9f8cb64eb5795f047f4f91e9dddb34f5a400 /src
parenta70653ac7e292670bb90fb57ecce796b09392590 (diff)
downloadrust-46f405ec4d7c6bf16fc2eaafe7541019f1da2996.tar.gz
rust-46f405ec4d7c6bf16fc2eaafe7541019f1da2996.zip
type_alias_enum_variants: Remove from unstable book.
Diffstat (limited to 'src')
-rw-r--r--src/doc/unstable-book/src/language-features/type-alias-enum-variants.md36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/doc/unstable-book/src/language-features/type-alias-enum-variants.md b/src/doc/unstable-book/src/language-features/type-alias-enum-variants.md
deleted file mode 100644
index bcdeafc4b11..00000000000
--- a/src/doc/unstable-book/src/language-features/type-alias-enum-variants.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# `type_alias_enum_variants`
-
-The tracking issue for this feature is: [#49683]
-
-[#49683]: https://github.com/rust-lang/rust/issues/49683
-
-------------------------
-
-The `type_alias_enum_variants` feature enables the use of variants on type
-aliases that refer to enums, as both a constructor and a pattern. That is,
-it allows for the syntax `EnumAlias::Variant`, which behaves exactly the same
-as `Enum::Variant` (assuming that `EnumAlias` is an alias for some enum type
-`Enum`).
-
-Note that since `Self` exists as a type alias, this feature also enables the
-use of the syntax `Self::Variant` within an impl block for an enum type.
-
-```rust
-#![feature(type_alias_enum_variants)]
-
-enum Foo {
-    Bar(i32),
-    Baz { i: i32 },
-}
-
-type Alias = Foo;
-
-fn main() {
-    let t = Alias::Bar(0);
-    let t = Alias::Baz { i: 0 };
-    match t {
-        Alias::Bar(_i) => {}
-        Alias::Baz { i: _i } => {}
-    }
-}
-```