Skip to content

Commit 3cfa0a0

Browse files
committed
Remove nightly features in rustc_type_ir
1 parent cb17136 commit 3cfa0a0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

compiler/rustc_index/src/vec.rs

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

125125
#[inline]
126126
$v const fn from_usize(value: usize) -> Self {
127-
assert!(value <= ($max as usize));
127+
[()][(value > ($max as usize)) as usize];
128128
unsafe {
129129
Self::from_u32_unchecked(value as u32)
130130
}
131131
}
132132

133133
#[inline]
134134
$v const fn from_u32(value: u32) -> Self {
135-
assert!(value <= $max);
135+
[()][(value > $max) as usize];
136136
unsafe {
137137
Self::from_u32_unchecked(value)
138138
}

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)