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