We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d40ba5 commit 6d54054Copy full SHA for 6d54054
src/items/type-aliases.md
@@ -20,13 +20,18 @@ type Point = (u8, u8);
20
let p: Point = (41, 68);
21
```
22
23
-A type alias to an enum type cannot be used to qualify the constructors:
+A type alias to an tuple-struct type cannot be used to qualify the constructors:
24
25
```rust
26
-enum E { A }
27
-type F = E;
28
-let _: F = E::A; // OK
29
-// let _: F = F::A; // Doesn't work
+pub struct MyStruct(u32);
+
+pub use self::MyStruct as PubUse;
+pub type PubType = MyStruct;
30
31
+fn main() {
32
+ let _ = PubUse(5); // OK
33
+ // let _ = PubType(5); // Doesn't work
34
+}
35
36
37
[IDENTIFIER]: ../identifiers.md
0 commit comments