File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -591,7 +591,7 @@ struct types, except that it must specify exactly one field:
591
591
592
592
``` rust
593
593
# union MyUnion { f1 : u32 , f2 : f32 }
594
-
594
+ #
595
595
let u = MyUnion { f1 : 1 };
596
596
```
597
597
@@ -612,7 +612,7 @@ union fields have to be placed in `unsafe` blocks.
612
612
``` rust
613
613
# union MyUnion { f1 : u32 , f2 : f32 }
614
614
# let u = MyUnion { f1 : 1 };
615
-
615
+ #
616
616
unsafe {
617
617
let f = u . f1;
618
618
}
@@ -624,7 +624,7 @@ so these writes don't have to be placed in `unsafe` blocks
624
624
``` rust
625
625
# union MyUnion { f1 : u32 , f2 : f32 }
626
626
# let mut u = MyUnion { f1 : 1 };
627
-
627
+ #
628
628
u . f1 = 2 ;
629
629
```
630
630
@@ -639,7 +639,7 @@ to be placed in `unsafe` blocks as well.
639
639
640
640
``` rust
641
641
# union MyUnion { f1 : u32 , f2 : f32 }
642
-
642
+ #
643
643
fn f (u : MyUnion ) {
644
644
unsafe {
645
645
match u {
You can’t perform that action at this time.
0 commit comments