Skip to content

Commit 27a00dc

Browse files
authored
Rollup merge of rust-lang#77488 - varkor:repr128-incomplete_features, r=jonas-schievink
Mark `repr128` as `incomplete_features` As mentioned in rust-lang#56071 and noticed in rust-lang#77457, `repr(u128)` and `repr(i128)` do not work properly due to lack of LLVM support. We should thus warn users trying to use the feature that they may encounter ICEs when using it. Closes rust-lang#77457.
2 parents f3ab6f0 + db0438b commit 27a00dc

File tree

9 files changed

+49
-0
lines changed

9 files changed

+49
-0
lines changed

compiler/rustc_feature/src/active.rs

+1
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[
622622
sym::const_trait_bound_opt_out,
623623
sym::lazy_normalization_consts,
624624
sym::specialization,
625+
sym::repr128,
625626
];
626627

627628
/// Some features are not allowed to be used together at the same time, if

src/test/ui/enum-discriminant/discriminant_size.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
#![feature(core_intrinsics, repr128)]
3+
//~^ WARN the feature `repr128` is incomplete
34

45
use std::intrinsics::discriminant_value;
56

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/discriminant_size.rs:2:29
3+
|
4+
LL | #![feature(core_intrinsics, repr128)]
5+
| ^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
9+
10+
warning: 1 warning emitted
11+

src/test/ui/enum-discriminant/issue-70509-partial_eq.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
#![feature(repr128, arbitrary_enum_discriminant)]
3+
//~^ WARN the feature `repr128` is incomplete
34

45
#[derive(PartialEq, Debug)]
56
#[repr(i128)]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/issue-70509-partial_eq.rs:2:12
3+
|
4+
LL | #![feature(repr128, arbitrary_enum_discriminant)]
5+
| ^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
9+
10+
warning: 1 warning emitted
11+

src/test/ui/enum-discriminant/repr128.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
#![feature(repr128, core_intrinsics, discriminant_kind)]
3+
//~^ WARN the feature `repr128` is incomplete
34

45
use std::intrinsics::discriminant_value;
56
use std::marker::DiscriminantKind;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/repr128.rs:2:12
3+
|
4+
LL | #![feature(repr128, core_intrinsics, discriminant_kind)]
5+
| ^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
9+
10+
warning: 1 warning emitted
11+

src/test/ui/issues/issue-43398.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#![feature(core_intrinsics)]
44
#![feature(repr128)]
5+
//~^ WARN the feature `repr128` is incomplete
56

67
#[repr(i128)]
78
enum Big { A, B }

src/test/ui/issues/issue-43398.stderr

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: the feature `repr128` is incomplete and may not be safe to use and/or cause compiler crashes
2+
--> $DIR/issue-43398.rs:4:12
3+
|
4+
LL | #![feature(repr128)]
5+
| ^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
= note: see issue #56071 <https://github.com/rust-lang/rust/issues/56071> for more information
9+
10+
warning: 1 warning emitted
11+

0 commit comments

Comments
 (0)