Skip to content

Commit d636b0a

Browse files
authored
Rollup merge of rust-lang#83804 - detrumi:build-type-ir-on-stable, r=petrochenkov
Remove nightly features in rustc_type_ir `rustc_type_ir` will be used as a type library by Chalk, which we want to be able to build on stable, so this PR removes the current nightly features used.
2 parents d0266e3 + 3ea7c90 commit d636b0a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

compiler/rustc_index/src/vec.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,17 @@ macro_rules! newtype_index {
124124

125125
#[inline]
126126
$v const fn from_usize(value: usize) -> Self {
127-
assert!(value <= ($max as usize));
127+
// FIXME: replace with `assert!(value <= ($max as usize));` once `const_panic` is stable
128+
[()][(value > ($max as usize)) as usize];
128129
unsafe {
129130
Self::from_u32_unchecked(value as u32)
130131
}
131132
}
132133

133134
#[inline]
134135
$v const fn from_u32(value: u32) -> Self {
135-
assert!(value <= $max);
136+
// FIXME: replace with `assert!(value <= $max);` once `const_panic` is stable
137+
[()][(value > $max) as usize];
136138
unsafe {
137139
Self::from_u32_unchecked(value)
138140
}

compiler/rustc_type_ir/src/lib.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#![feature(never_type)]
2-
#![feature(const_panic)]
3-
#![feature(control_flow_enum)]
4-
51
#[macro_use]
62
extern crate bitflags;
73
#[macro_use]

0 commit comments

Comments
 (0)