From 790178f6e5e63265f9b59ed5748aa4de924e38e5 Mon Sep 17 00:00:00 2001 From: "NODA, Kai" Date: Mon, 15 Feb 2016 08:13:08 +0800 Subject: [PATCH] reference.md: clarify the limitation of type alias on an enum Cf. rust-lang/rust#26264 Signed-off-by: NODA, Kai --- src/doc/reference.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/doc/reference.md b/src/doc/reference.md index a94609a8b0cc1..1971f2ac147f1 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -1118,6 +1118,16 @@ type Point = (u8, u8); let p: Point = (41, 68); ``` +Currently a type alias to an enum type cannot be used to qualify the +constructors: + +``` +enum E { A } +type F = E; +let _: F = E::A; // OK +// let _: F = F::A; // Doesn't work +``` + ### Structs A _struct_ is a nominal [struct type](#struct-types) defined with the