Mark `repr128` as `incomplete_features`

This commit is contained in:
varkor 2020-10-03 14:47:28 +01:00
parent 1d2726726f
commit e0b61111f8
9 changed files with 49 additions and 0 deletions

View File

@ -622,6 +622,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
sym::lazy_normalization_consts,
sym::specialization,
sym::inline_const,
sym::repr128,
];
/// Some features are not allowed to be used together at the same time, if

View File

@ -1,5 +1,6 @@
// run-pass
#![feature(core_intrinsics, repr128)]
//~^ WARN the feature `repr128` is incomplete
use std::intrinsics::discriminant_value;

View File

@ -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 <https://github.com/rust-lang/rust/issues/56071> for more information
warning: 1 warning emitted

View File

@ -1,5 +1,6 @@
// run-pass
#![feature(repr128, arbitrary_enum_discriminant)]
//~^ WARN the feature `repr128` is incomplete
#[derive(PartialEq, Debug)]
#[repr(i128)]

View File

@ -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 <https://github.com/rust-lang/rust/issues/56071> for more information
warning: 1 warning emitted

View File

@ -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;

View File

@ -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 <https://github.com/rust-lang/rust/issues/56071> for more information
warning: 1 warning emitted

View File

@ -2,6 +2,7 @@
#![feature(core_intrinsics)]
#![feature(repr128)]
//~^ WARN the feature `repr128` is incomplete
#[repr(i128)]
enum Big { A, B }

View File

@ -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 <https://github.com/rust-lang/rust/issues/56071> for more information
warning: 1 warning emitted