Skip to content

Commit 30df2da

Browse files
committed
Remove outdated comment about non-copy unions
I'm not sure when exactly this was removed, but non-copy union fields aren't allowed, and there is no nightly feature to allow them AFAIK. There was various discussion in the tracking issue rust-lang/rust#55149 and various changes like rust-lang/rust#97995 on what is allowed, but I did not dig down to find the exact change that closed the door. The allowed field kinds are described in items.union.field-restrictions. Also, in general the reference shouldn't be referring to unstable features.
1 parent 9571d4d commit 30df2da

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/type-layout.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,6 @@ struct MyCFields { x: u32, y: u8 }
419419
struct MyDFields;
420420
```
421421

422-
> [!NOTE]
423-
> `union`s with non-`Copy` fields are unstable, see [55149].
424-
425422
r[layout.repr.primitive]
426423
### Primitive representations
427424

@@ -496,9 +493,6 @@ struct MyVariantC { tag: MyEnumDiscriminant, x: u32, y: u8 }
496493
struct MyVariantD(MyEnumDiscriminant);
497494
```
498495

499-
> [!NOTE]
500-
> `union`s with non-`Copy` fields are unstable, see [55149].
501-
502496
r[layout.repr.primitive-c]
503497
#### Combining primitive representations of enums with fields and `#[repr(C)]`
504498

@@ -668,7 +662,6 @@ used with any other representation.
668662
[enumerations]: items/enumerations.md
669663
[zero-variant enums]: items/enumerations.md#zero-variant-enums
670664
[undefined behavior]: behavior-considered-undefined.md
671-
[55149]: https://github.com/rust-lang/rust/issues/55149
672665
[`PhantomData<T>`]: special-types-and-traits.md#phantomdatat
673666
[`Rust`]: #the-rust-representation
674667
[`C`]: #the-c-representation

0 commit comments

Comments
 (0)