reference.md: clarify the limitation of type alias on an enum
Cf. rust-lang/rust#26264 Signed-off-by: NODA, Kai <nodakai@gmail.com>
This commit is contained in:
parent
388ccda455
commit
790178f6e5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user