Skip to content

Commit 0564cc9

Browse files
committed
remove pub
1 parent 1d42f56 commit 0564cc9

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/items/type-aliases.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ let p: Point = (41, 68);
2323
A type alias to a tuple-struct or unit-struct cannot be used to qualify that type's constructor:
2424

2525
```rust,edition2018,compile_fail
26-
pub struct MyStruct(u32);
26+
struct MyStruct(u32);
2727
28-
pub use self::MyStruct as PubUse;
29-
pub type PubType = MyStruct;
28+
use self::MyStruct as PubUse;
29+
type PubType = MyStruct;
3030
31-
fn main() {
32-
let _ = PubUse(5); // OK
33-
let _ = PubType(5); // Doesn't work
34-
}
31+
let _ = PubUse(5); // OK
32+
let _ = PubType(5); // Doesn't work
3533
```
3634

3735
[IDENTIFIER]: ../identifiers.md

0 commit comments

Comments
 (0)