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 1d42f56 commit 0564cc9Copy full SHA for 0564cc9
src/items/type-aliases.md
@@ -23,15 +23,13 @@ let p: Point = (41, 68);
23
A type alias to a tuple-struct or unit-struct cannot be used to qualify that type's constructor:
24
25
```rust,edition2018,compile_fail
26
-pub struct MyStruct(u32);
+struct MyStruct(u32);
27
28
-pub use self::MyStruct as PubUse;
29
-pub type PubType = MyStruct;
+use self::MyStruct as PubUse;
+type PubType = MyStruct;
30
31
-fn main() {
32
- let _ = PubUse(5); // OK
33
- let _ = PubType(5); // Doesn't work
34
-}
+let _ = PubUse(5); // OK
+let _ = PubType(5); // Doesn't work
35
```
36
37
[IDENTIFIER]: ../identifiers.md
0 commit comments