Skip to content

Commit 822f787

Browse files
committed
Adjust the tracking issue for untagged_unions.
Also elaborate on some feature gates in `active.rs`.
1 parent 4a8c5b2 commit 822f787

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/libsyntax/feature_gate/active.rs

+13-5
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,13 @@ declare_features! (
330330
/// Allows exhaustive pattern matching on types that contain uninhabited types.
331331
(active, exhaustive_patterns, "1.13.0", Some(51085), None),
332332

333-
/// Allows untagged unions `union U { ... }`.
334-
(active, untagged_unions, "1.13.0", Some(32836), None),
333+
/// Allows `union`s to implement `Drop`. Moreover, `union`s may now include fields
334+
/// that don't implement `Copy` as long as they don't have any drop glue.
335+
/// This is checked recursively. On encountering type variable where no progress can be made,
336+
/// `T: Copy` is used as a substitute for "no drop glue".
337+
///
338+
/// NOTE: A limited form of `union U { ... }` was accepted in 1.19.0.
339+
(active, untagged_unions, "1.13.0", Some(55149), None),
335340

336341
/// Allows `#[link(..., cfg(..))]`.
337342
(active, link_cfg, "1.14.0", Some(37406), None),
@@ -522,13 +527,16 @@ declare_features! (
522527
/// Allows the definition of `const extern fn` and `const unsafe extern fn`.
523528
(active, const_extern_fn, "1.40.0", Some(64926), None),
524529

525-
// Allows the use of raw-dylibs (RFC 2627).
530+
/// Allows the use of raw-dylibs (RFC 2627).
526531
(active, raw_dylib, "1.40.0", Some(58713), None),
527532

528-
/// Enable accurate caller location reporting during panic (RFC 2091).
533+
/// Allows `#[track_caller]` to be used which provides
534+
/// accurate caller location reporting during panic (RFC 2091).
529535
(active, track_caller, "1.40.0", Some(47809), None),
530536

531-
/// Non-object safe trait objects safe to use but cannot be created in safe rust
537+
/// Allows making `dyn Trait` well-formed even if `Trait` is not object safe.
538+
/// In that case, `dyn Trait: Trait` does not hold. Moreover, coercions and
539+
/// casts in safe Rust to `dyn Trait` for such a `Trait` is also forbidden.
532540
(active, object_safe_for_dispatch, "1.40.0", Some(43561), None),
533541

534542
// -------------------------------------------------------------------------

src/test/ui/feature-gates/feature-gate-untagged_unions.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | | a: String,
66
LL | | }
77
| |_^
88
|
9-
= note: for more information, see https://github.com/rust-lang/rust/issues/32836
9+
= note: for more information, see https://github.com/rust-lang/rust/issues/55149
1010
= help: add `#![feature(untagged_unions)]` to the crate attributes to enable
1111

1212
error[E0658]: unions with non-`Copy` fields are unstable
@@ -17,7 +17,7 @@ LL | | a: T,
1717
LL | | }
1818
| |_^
1919
|
20-
= note: for more information, see https://github.com/rust-lang/rust/issues/32836
20+
= note: for more information, see https://github.com/rust-lang/rust/issues/55149
2121
= help: add `#![feature(untagged_unions)]` to the crate attributes to enable
2222

2323
error[E0658]: unions with `Drop` implementations are unstable
@@ -28,7 +28,7 @@ LL | | a: u8,
2828
LL | | }
2929
| |_^
3030
|
31-
= note: for more information, see https://github.com/rust-lang/rust/issues/32836
31+
= note: for more information, see https://github.com/rust-lang/rust/issues/55149
3232
= help: add `#![feature(untagged_unions)]` to the crate attributes to enable
3333

3434
error[E0740]: unions may not contain fields that need dropping

0 commit comments

Comments
 (0)