From db0438be6863ca1c005458db7e0def489567ada1 Mon Sep 17 00:00:00 2001 From: varkor Date: Sat, 3 Oct 2020 14:47:28 +0100 Subject: [PATCH] Mark `repr128` as `incomplete_features` --- compiler/rustc_feature/src/active.rs | 1 + src/test/ui/enum-discriminant/discriminant_size.rs | 1 + .../ui/enum-discriminant/discriminant_size.stderr | 11 +++++++++++ .../ui/enum-discriminant/issue-70509-partial_eq.rs | 1 + .../enum-discriminant/issue-70509-partial_eq.stderr | 11 +++++++++++ src/test/ui/enum-discriminant/repr128.rs | 1 + src/test/ui/enum-discriminant/repr128.stderr | 11 +++++++++++ src/test/ui/issues/issue-43398.rs | 1 + src/test/ui/issues/issue-43398.stderr | 11 +++++++++++ 9 files changed, 49 insertions(+) create mode 100644 src/test/ui/enum-discriminant/discriminant_size.stderr create mode 100644 src/test/ui/enum-discriminant/issue-70509-partial_eq.stderr create mode 100644 src/test/ui/enum-discriminant/repr128.stderr create mode 100644 src/test/ui/issues/issue-43398.stderr diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 060efd270dd51..3324ecf2a3995 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -613,6 +613,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[ sym::const_trait_bound_opt_out, sym::lazy_normalization_consts, sym::specialization, + sym::repr128, ]; /// Some features are not allowed to be used together at the same time, if diff --git a/src/test/ui/enum-discriminant/discriminant_size.rs b/src/test/ui/enum-discriminant/discriminant_size.rs index 4cede8c2a2ded..b939a70dfc568 100644 --- a/src/test/ui/enum-discriminant/discriminant_size.rs +++ b/src/test/ui/enum-discriminant/discriminant_size.rs @@ -1,5 +1,6 @@ // run-pass #![feature(core_intrinsics, repr128)] +//~^ WARN the feature `repr128` is incomplete use std::intrinsics::discriminant_value; diff --git a/src/test/ui/enum-discriminant/discriminant_size.stderr b/src/test/ui/enum-discriminant/discriminant_size.stderr new file mode 100644 index 0000000000000..efc7d998466cd --- /dev/null +++ b/src/test/ui/enum-discriminant/discriminant_size.stderr @@ -0,0 +1,11 @@ +warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/discriminant_size.rs:2:29 + | +LL | #![feature(core_intrinsics, repr128)] + | ^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #56071 for more information + +warning: 1 warning emitted + diff --git a/src/test/ui/enum-discriminant/issue-70509-partial_eq.rs b/src/test/ui/enum-discriminant/issue-70509-partial_eq.rs index 4e2cc89948a01..ae389e1146645 100644 --- a/src/test/ui/enum-discriminant/issue-70509-partial_eq.rs +++ b/src/test/ui/enum-discriminant/issue-70509-partial_eq.rs @@ -1,5 +1,6 @@ // run-pass #![feature(repr128, arbitrary_enum_discriminant)] +//~^ WARN the feature `repr128` is incomplete #[derive(PartialEq, Debug)] #[repr(i128)] diff --git a/src/test/ui/enum-discriminant/issue-70509-partial_eq.stderr b/src/test/ui/enum-discriminant/issue-70509-partial_eq.stderr new file mode 100644 index 0000000000000..5bf6ea56ebc77 --- /dev/null +++ b/src/test/ui/enum-discriminant/issue-70509-partial_eq.stderr @@ -0,0 +1,11 @@ +warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/issue-70509-partial_eq.rs:2:12 + | +LL | #![feature(repr128, arbitrary_enum_discriminant)] + | ^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #56071 for more information + +warning: 1 warning emitted + diff --git a/src/test/ui/enum-discriminant/repr128.rs b/src/test/ui/enum-discriminant/repr128.rs index eefbc44f585b2..00021a07b3719 100644 --- a/src/test/ui/enum-discriminant/repr128.rs +++ b/src/test/ui/enum-discriminant/repr128.rs @@ -1,5 +1,6 @@ // run-pass #![feature(repr128, core_intrinsics, discriminant_kind)] +//~^ WARN the feature `repr128` is incomplete use std::intrinsics::discriminant_value; use std::marker::DiscriminantKind; diff --git a/src/test/ui/enum-discriminant/repr128.stderr b/src/test/ui/enum-discriminant/repr128.stderr new file mode 100644 index 0000000000000..88adfb1742d5d --- /dev/null +++ b/src/test/ui/enum-discriminant/repr128.stderr @@ -0,0 +1,11 @@ +warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/repr128.rs:2:12 + | +LL | #![feature(repr128, core_intrinsics, discriminant_kind)] + | ^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #56071 for more information + +warning: 1 warning emitted + diff --git a/src/test/ui/issues/issue-43398.rs b/src/test/ui/issues/issue-43398.rs index f0b762c6254a3..581db033f9257 100644 --- a/src/test/ui/issues/issue-43398.rs +++ b/src/test/ui/issues/issue-43398.rs @@ -2,6 +2,7 @@ #![feature(core_intrinsics)] #![feature(repr128)] +//~^ WARN the feature `repr128` is incomplete #[repr(i128)] enum Big { A, B } diff --git a/src/test/ui/issues/issue-43398.stderr b/src/test/ui/issues/issue-43398.stderr new file mode 100644 index 0000000000000..9a394153bf62f --- /dev/null +++ b/src/test/ui/issues/issue-43398.stderr @@ -0,0 +1,11 @@ +warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/issue-43398.rs:4:12 + | +LL | #![feature(repr128)] + | ^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + = note: see issue #56071 for more information + +warning: 1 warning emitted +