未验证 提交 790178f6 编写于 作者: N NODA, Kai

reference.md: clarify the limitation of type alias on an enum

Cf. rust-lang/rust#26264
Signed-off-by: NNODA, Kai <nodakai@gmail.com>
上级 388ccda4
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册