about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilco Kusee <wilcokusee@gmail.com>2021-04-03 10:00:09 +0200
committerWilco Kusee <wilcokusee@gmail.com>2021-04-03 10:00:09 +0200
commit3cfa0a0dff610e228819579709c035c9a1d4310b (patch)
tree76d8d0b727ac704bbb730e9e8462dc2cf8c6747b
parentcb1713640532ca829479554459406e152213e95c (diff)
downloadrust-3cfa0a0dff610e228819579709c035c9a1d4310b.tar.gz
rust-3cfa0a0dff610e228819579709c035c9a1d4310b.zip
Remove nightly features in rustc_type_ir
-rw-r--r--compiler/rustc_index/src/vec.rs4
-rw-r--r--compiler/rustc_type_ir/src/lib.rs4
2 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs
index 3882818952c..6b29079109e 100644
--- a/compiler/rustc_index/src/vec.rs
+++ b/compiler/rustc_index/src/vec.rs
@@ -124,7 +124,7 @@ macro_rules! newtype_index {
 
             #[inline]
             $v const fn from_usize(value: usize) -> Self {
-                assert!(value <= ($max as usize));
+                [()][(value > ($max as usize)) as usize];
                 unsafe {
                     Self::from_u32_unchecked(value as u32)
                 }
@@ -132,7 +132,7 @@ macro_rules! newtype_index {
 
             #[inline]
             $v const fn from_u32(value: u32) -> Self {
-                assert!(value <= $max);
+                [()][(value > $max) as usize];
                 unsafe {
                     Self::from_u32_unchecked(value)
                 }
diff --git a/compiler/rustc_type_ir/src/lib.rs b/compiler/rustc_type_ir/src/lib.rs
index fccd8b795ef..8fcdf813b41 100644
--- a/compiler/rustc_type_ir/src/lib.rs
+++ b/compiler/rustc_type_ir/src/lib.rs
@@ -1,7 +1,3 @@
-#![feature(never_type)]
-#![feature(const_panic)]
-#![feature(control_flow_enum)]
-
 #[macro_use]
 extern crate bitflags;
 #[macro_use]